-
Notifications
You must be signed in to change notification settings - Fork 796
[SYCL][NewOffload] Introduce specialization constants in clang-linker-wrapper #15133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I need to check how "default_values" mode is handled in clang-linker-wrapper. |
| Flags<[WrapperOnlyOption]>, | ||
| HelpText<"Option that turns on split library with the given split mode">; | ||
|
|
||
| def sycl_spec_const_handling_mode_EQ : Joined<["--", "-"], "sycl-spec-const-handling-mode=">, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
My understanding of when we should clang-linker-wrapper args is when we need to communicate information from the driver to clang-linker-wrapper, where in most cases that happens for user specified command-line args that effect how clang-linker-wrapper needs to act.
For this case, I'm not sure I see why we need the new flag. I don't see any user visible option for Clang to effect spec consts, only logic to set the -spec-const flag to sycl-post-link, which seems to be a triple-based calculation.
Also in this PR I don't see any changes to the driver to set this new flag.
Could you go into detail on why we need this flag and how we plan to modify the driver to set it?
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on @sarnex comment here about the need for this mode.
I see the related code here
| bool SpecConstsSupported = (!Triple.isNVPTX() && !Triple.isAMDGCN() && |
and the spec-const mode seems to rely on the target triple and nothing else and hence should be computed inside the clang-linker-wrapper.
@maksimsab please let me know if we are missing something here.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. It needs to be redesigned.
|
This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be automatically closed in 30 days. |
Add -sycl-spec-const-handling-mode command line option to clang-linker-wrapper.
processSpecConstants is moved from sycl-post-link to lib/SYCLLowerIR/SpecConstants.cpp and invoked from sycl-post-link and splitting library.