Skip to content

[HIP] Changes for device_globals and enable tests #12165

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

Merged
merged 7 commits into from
Jan 16, 2024

Conversation

hdelan
Copy link
Contributor

@hdelan hdelan commented Dec 13, 2023

Enable device_global for AMDGPU. Related to oneapi-src/unified-runtime#1186 .

In order for hipModuleGetGlobal to see a global symbol we need to not make the visibility of the symbol hidden. Perhaps changing this as a default is not always a good idea. Could also do this in the SYCL headers using an attribute to specify the visibility of the device_global var

@hdelan hdelan requested review from a team as code owners December 13, 2023 21:18
@hdelan hdelan requested a review from steffenlarsen December 13, 2023 21:18
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Very nice! I'm glad to see the program-metadata approach not being too much of a pain to include into the HIP backend. Thank you, @hdelan !

@jinz2014
Copy link
Contributor

I have a question. Does hipcc see a global symbol by making visibility of symbols ? Thanks.

@hdelan
Copy link
Contributor Author

hdelan commented Dec 19, 2023

I have a question. Does hipcc see a global symbol by making visibility of symbols ? Thanks.

Hi @jinz2014 it seems that HIPCC gives device globals protected visibility in the resulting binary.

@kbenzie kbenzie marked this pull request as draft January 3, 2024 13:54
@hdelan hdelan marked this pull request as ready for review January 5, 2024 10:49
@kbenzie kbenzie changed the title [draft][HIP] Changes for device_globals and enable tests [HIP] Changes for device_globals and enable tests Jan 10, 2024
@aarongreig
Copy link
Contributor

update the tag and we're good to go @hdelan

@hdelan
Copy link
Contributor Author

hdelan commented Jan 12, 2024

update the tag and we're good to go @hdelan

Thanks @aarongreig ! Have updated

@aarongreig
Copy link
Contributor

ah might have been too quick on the draw from #12381 merging you'll need to resolve the conflict

@hdelan
Copy link
Contributor Author

hdelan commented Jan 12, 2024

ah might have been too quick on the draw from #12381 merging you'll need to resolve the conflict

Yep just resolved. Will need to wait for pipeline I imagine

@hdelan hdelan force-pushed the run-device-global-hip branch from aa1be5a to e8bf853 Compare January 12, 2024 16:29
@kbenzie
Copy link
Contributor

kbenzie commented Jan 15, 2024

@intel/dpcpp-clang-driver-reviewers please review

@hdelan
Copy link
Contributor Author

hdelan commented Jan 16, 2024

@steffenlarsen we are blocked here awaiting @intel/dpcpp-clang-driver-reviewers . Quite a small group and it seems they are off atm. What should we do here?

@steffenlarsen
Copy link
Contributor

I believe they should be back today. Tag @mdtoguchi.

If I am wrong, I think we can merge and allow for a post-commit review if needed, though the driver changes don't seem so intrusive to me. Let's give it another day though.

Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

Driver changes are OK - could you add some LIT testing to verify the additional option passing to sycl-post-link and compile step?

Add a test to check that -fvisibility=hidden is not
used for SYCL HIP compilation, and also add test
that program metadata is emitted for SYCL HIP
@hdelan
Copy link
Contributor Author

hdelan commented Jan 16, 2024

Thanks @mdtoguchi have added a test for driver

Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

LGTM - thanks!

@kbenzie
Copy link
Contributor

kbenzie commented Jan 16, 2024

@intel/llvm-gatekeepers please merge

@sarnex sarnex merged commit d377464 into intel:sycl Jan 16, 2024
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