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

Adaptive Cpp CMake integration #1483

Open
Helena2007 opened this issue Jun 17, 2024 · 1 comment
Open

Adaptive Cpp CMake integration #1483

Helena2007 opened this issue Jun 17, 2024 · 1 comment
Labels
discussion General discussion about something

Comments

@Helena2007
Copy link

I have completed the AdaptiveCpp CMake integration on the example project. When tested it runs on GPU. I have also completed the AdaptiveCpp CMake integration on the Geobox project of Geogram Library. The executable is generated and running. But when I tested it still ran on CPU instead of GPU. I have followed the same steps in both cases. When I analyzed the code I found that the bruteforce_nbody.cpp code in the example project had used sycl constructs in the cpp code. So, to do AdaptiveCpp CMake integration on any other project do we have to add sycl constructs in the cpp code? Is there any method to add sycl constructs to the cpp code other than manually?

@Helena2007 Helena2007 added the discussion General discussion about something label Jun 17, 2024
@illuhad
Copy link
Collaborator

illuhad commented Jun 18, 2024

There is no compiler on the planet that can just take C++ code without any data parallel constructs and run it on GPU.

AdaptiveCpp can

  • Run SYCL kernels on GPUs. This will require you to write data parallel kernels in SYCL for those components you wish to offload.
  • Offload standard C++ parallel STL to GPUs, if you're using the std::execution::par_unseq policy. This will require you to formulate the parts of the program you wish to offload using C++ parallel STL algorithms, if the program is not already using them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion General discussion about something
Projects
None yet
Development

No branches or pull requests

2 participants