-
Notifications
You must be signed in to change notification settings - Fork 29
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
Enable building to target AMD GPUs #1731
base: master
Are you sure you want to change the base?
Conversation
70b1e1c
to
45f3f28
Compare
View rendered docs @ https://intelpython.github.io/dpctl/pulls/1731/index.html |
Array API standard conformance tests for dpctl=0.18.0dev0=py310h15de555_104 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_180 ran successfully. |
Add DPCTL_TARGET_AMD cmake variable which is a string referring to the architecture to build for
Prevents build failure on AMD
7b04098
to
c53fb26
Compare
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_311 ran successfully. |
@ndgrigorian Regrettably use of Perhaps a preprocessor variable can be used to enable building for SPV/NVPTX or SPV/AMDGCN targets, but not for all three except after the bug gets fixed. It may be possible to write implementation of log1p to enable building for all three too. |
Yes, I only added the commit to make it convenient for the build failure to be reproduced. Writing our own implementation is possible, too. I think that would be preferable, but on the other hand, it's a corner case to build for both CUDA and AMD. |
This PR modifies cmake scripts throughout dpctl to enable building for AMD. This is done by either setting the
DPCTL_TARGET_AMD
environment variable to the intended build architecture, or using-DDPCTL_TARGET_AMD
._dpctl_sycl_target_compile_options
and_dpctl_sycl_target_link_options
cmake lists are used to prevent branching logic in later scripts.