Skip to content
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

Remove deprecated SYCL usage for newer compilers #1772

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

rhornung67
Copy link
Member

Summary

  • This PR squashes a bunch of compiler warnings due to deprecated SYCL usage in camp and RAJA.
  • Note: this PR depends on changes in a camp branch. That needs to be merged and pulled in here before this can be merged.

@rhornung67
Copy link
Member Author

This is good to merge. Please review when you have some time. Thank you.

@@ -39,7 +39,7 @@ struct uint3 {
unsigned long x, y, z;
};

using sycl_dim_t = cl::sycl::range<1>;
using sycl_dim_t = sycl::range<1>;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe keep the global scope ::sycl for consistency?

Suggested change
using sycl_dim_t = sycl::range<1>;
using sycl_dim_t = ::sycl::range<1>;

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Fixed.

Note that I didn't exhaustively search the code for these. I only changed the lines that generated compiler warnings.

Comment on lines +113 to +114
device = reinterpret_cast<T *>(::sycl::malloc_device(sycl::MaxNumTeams * sizeof(T), *(q)));
host = reinterpret_cast<T *>(::sycl::malloc_host(sycl::MaxNumTeams * sizeof(T), *(q)));
Copy link
Member

Choose a reason for hiding this comment

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

The references to MaxNumTeams look slightly confusing; should they be under the RAJA::sycl:: namespace?

Suggested change
device = reinterpret_cast<T *>(::sycl::malloc_device(sycl::MaxNumTeams * sizeof(T), *(q)));
host = reinterpret_cast<T *>(::sycl::malloc_host(sycl::MaxNumTeams * sizeof(T), *(q)));
device = reinterpret_cast<T *>(::sycl::malloc_device(RAJA::sycl::MaxNumTeams * sizeof(T), *(q)));
host = reinterpret_cast<T *>(::sycl::malloc_host(RAJA::sycl::MaxNumTeams * sizeof(T), *(q)));

Copy link
Member Author

@rhornung67 rhornung67 Dec 10, 2024

Choose a reason for hiding this comment

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

Note that I did not write this code and was fixing compiler warnings. It looks like this file was started as a copy of the similarly named openmp target file.

This is probably a better was to define the variable: https://github.com/LLNL/RAJA/blob/develop/include/RAJA/policy/openmp_target/reduce.hpp#L70

However, that file also contains similar namespace scoping issues. For example, https://github.com/LLNL/RAJA/blob/develop/include/RAJA/policy/openmp_target/reduce.hpp#L107

I'll make an issue and we can fix those files and others for consistency as needed in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

@artv3
Copy link
Member

artv3 commented Dec 10, 2024

I'm having the same build failure (OMP Target) on a different RAJA PR....

@rhornung67
Copy link
Member Author

rhornung67 commented Dec 11, 2024

I'm having the same build failure (OMP Target) on a different RAJA PR....

Try restarting the failed job. One test fails intermittently. Not sure why.

@rhornung67 rhornung67 merged commit 3c71010 into develop Dec 11, 2024
32 checks passed
@rhornung67 rhornung67 deleted the task/rhornung67/squash_sycl_warnings branch December 11, 2024 20:15
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.

3 participants