Skip to content

Conversation

Fznamznon
Copy link
Contributor

The tool will split single big linked device module into smaller ones
using 'module-id' attribute applied to kernels.

Signed-off-by: Mariya Podchishchaeva [email protected]

@Fznamznon
Copy link
Contributor Author

This is part of device code splitting feature. Please refer #631 for full design doc.

@Fznamznon Fznamznon requested a review from kbobrovs October 3, 2019 10:59
Copy link
Contributor

@keryell keryell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good.
Just a few stylistic remarks since you are starting a new tool: this is a good opportunity to enter the 21th century. :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these thousands of ( and ) should be { and } in a new software like this one. :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Let's be modern in 2019 and make Chandler happy! :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Twine { }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Twine { }

@kbobrovs
Copy link
Contributor

kbobrovs commented Oct 7, 2019

I have a general comment. It turns out we may soon need other kinds post-link processing on the device code. So I suggest to treat this tool as a placeholder for all such post-link LLVM passes so that we don't create a new tool each time. More concretely, rename it to something like sycl-post-link/sycl-post-link.cpp

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these attributes required for the test to work? If not, suggest removing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not, removed.

@sergey-semenov sergey-semenov force-pushed the private/mpodchis/sycl-split branch from 4d4d339 to 253c73c Compare October 8, 2019 12:16
@sergey-semenov
Copy link
Contributor

Per our agreement with Mariya, I'll be driving this PR for now.

More concretely, rename it to something like sycl-post-link/sycl-post-link.cpp

Done.

@keryell thanks for the comments. Applied most of them, the only part I disagree on is replacing parentheses with uniform initialization for constructors of temporaries. From LLVM coding standards (Do not use Braced Initializer Lists to Call a Constructor):

if you need to explicitly name the type and call its constructor to create a temporary, don’t use a braced initializer list

@keryell
Copy link
Contributor

keryell commented Oct 8, 2019

@keryell thanks for the comments. Applied most of them, the only part I disagree on is replacing parentheses with uniform initialization for constructors of temporaries. From LLVM coding standards (Do not use Braced Initializer Lists to Call a Constructor):

Interestingly, LLVM is doing the opposite of the C++ Core Guidelines https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-list

The problem I have with using parenthesis with constructors is that it is less obvious that there is some object construction when browsing the code...

@Fznamznon Fznamznon changed the title [SYCL] Implement sycl-split tool [SYCL] Implement sycl-post-link tool Oct 14, 2019
@Fznamznon
Copy link
Contributor Author

ping.

keryell
keryell previously approved these changes Oct 14, 2019
Fznamznon and others added 3 commits October 15, 2019 11:27
The tool will split single big linked device module into smaller ones
using 'module-id' attribute applied to kernels.

Signed-off-by: Mariya Podchishchaeva <[email protected]>
Signed-off-by: Sergey Semenov <[email protected]>
Signed-off-by: Sergey Semenov <[email protected]>
Signed-off-by: Mariya Podchishchaeva <[email protected]>
Signed-off-by: Mariya Podchishchaeva <[email protected]>
@romanovvlad romanovvlad merged commit 5491486 into intel:sycl Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants