-
Notifications
You must be signed in to change notification settings - Fork 173
[BLAS][SPARSE][DPC++] Add CUDA_TARGETS option to pass for AoT compila… #710
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,24 @@ target_include_directories(${LIB_OBJ} | |
|
|
||
| target_compile_options(${LIB_OBJ} PRIVATE ${ONEMATH_BUILD_COPT}) | ||
|
|
||
| if (NOT "${ONEMATH_SYCL_IMPLEMENTATION}" STREQUAL "adaptivecpp") | ||
| target_compile_options(ONEMATH::SYCL::SYCL INTERFACE | ||
| -fsycl-targets=nvptx64-nvidia-cuda -fsycl-unnamed-lambda | ||
| ) | ||
| target_link_options(ONEMATH::SYCL::SYCL INTERFACE | ||
| -fsycl-targets=nvptx64-nvidia-cuda | ||
| ) | ||
|
|
||
| if (DEFINED CUDA_TARGETS AND NOT "${CUDA_TARGETS}" STREQUAL "") | ||
| target_compile_options(ONEMATH::SYCL::SYCL INTERFACE | ||
| -Xsycl-target-backend --cuda-gpu-arch=${CUDA_TARGETS} | ||
| ) | ||
| target_link_options(ONEMATH::SYCL::SYCL INTERFACE | ||
| -Xsycl-target-backend --cuda-gpu-arch=${CUDA_TARGETS} | ||
| ) | ||
| endif() | ||
| endif() | ||
|
|
||
|
Comment on lines
+46
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is fine, it is same update as for BLAS, for CUDA + SYCL linking, so no reason to object
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, was just adding it for consistency between the domains. Having a way to add AoT support too and to avoid issues with newer CUDA versions |
||
| if (${CMAKE_VERSION} VERSION_LESS "3.17.0") | ||
| find_package(CUDA 12.2 REQUIRED) | ||
| target_include_directories(${LIB_OBJ} PRIVATE ${CUDA_INCLUDE_DIRS}) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.