Skip to content

[SYCL][sycl-post-link] Makes device_global property names consistent #5903

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

steffenlarsen
Copy link
Contributor

This commit changes the IR attributes expected for device_global properties more consistent with other sycl-related IR attributes, i.e. the naming being prefixed by "sycl-" and replacing "_" with "-".

This commit changes the IR attributes expected for device_global
properties more consistent with other sycl-related IR attributes, i.e.
the naming being prefixed by "sycl-" and replacing "_" with "-".

Signed-off-by: Steffen Larsen <[email protected]>
@steffenlarsen steffenlarsen requested a review from a team as a code owner March 28, 2022 13:54
@steffenlarsen steffenlarsen requested a review from a user March 28, 2022 13:54
@ghost
Copy link

ghost commented Mar 28, 2022

@steffenlarsen @gmlueck I took the names for the properties from the design document. Should the design document be updated as well?

@ghost
Copy link

ghost commented Mar 28, 2022

@steffenlarsen Also, there is a reference to the device_image_scope property in an error message: https://github.com/intel/llvm/blob/sycl/llvm/tools/sycl-post-link/ModuleSplitter.cpp#L266

@steffenlarsen
Copy link
Contributor Author

I took the names for the properties from the design document. Should the design document be updated as well?

Nothing was set in stone for the "meta-names" (i.e. their names as LLVM IR attributes) of the properties as the design document did not specify them. "sycl-device-global-size" uses a naming scheme like the one in these changes, so it makes the IR attributes more consistent. As such I don't believe we need changes to the design document for this.

In an upcoming patch I add a common way for defining "meta-names". As part of it, it specifies this as typical naming for the meta-names, so hopefully it should not cause any confusion in the future.

Also, there is a reference to the device_image_scope property in an error message: https://github.com/intel/llvm/blob/sycl/llvm/tools/sycl-post-link/ModuleSplitter.cpp#L266

That is fine. It refers to the property which is still device_image_scope.

@ghost
Copy link

ghost commented Mar 28, 2022

That is fine. It refers to the property which is still device_image_scope.

But I see that in the tests you have renamed the property to sycl-device-image-scope. Do I get it right, in C++ this property is still device_image_scope but in the IR this will be named sycl-device-image-scope?

@steffenlarsen
Copy link
Contributor Author

That is fine. It refers to the property which is still device_image_scope.

But I see that in the tests you have renamed the property to sycl-device-image-scope. Do I get it right, in C++ this property is still device_image_scope but in the IR this will be named sycl-device-image-scope?

Yeah, so in the LLVM IR the attribute for the device_image_scope property will be named sycl-device-image-scope. I tried my best to keep device_image_scope (and other property names) in the places where they are mentioned as properties and not attributes. I don't see any cases I missed, but please let me know if you find some.

@ghost
Copy link

ghost commented Mar 28, 2022

@steffenlarsen Thank you for the explanation. Now the patch LGTM.

@AlexeySachkov AlexeySachkov merged commit 904051c into intel:sycl Mar 29, 2022
@steffenlarsen steffenlarsen deleted the steffen/sycl_post_link_device_global_adjustments branch December 6, 2023 11:38
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.

2 participants