Skip to content

Conversation

@abagusetty
Copy link
Contributor

…tion

  1. Adds an option to use CUDA_TARGETS similar to existing option for HIP_TARGETS for AoT builds of DPC++ compiler
  2. generic blas already has stubs to use arch flags but was not set

@abagusetty abagusetty requested review from a team as code owners September 17, 2025 19:39
Comment on lines +46 to +63
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()

Choose a reason for hiding this comment

The 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

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
Context: CUDA 13 dropped support for several older NVIDIA GPU architectures, specifically Maxwell (compute capability 5.x), Pascal (compute capability 6.x), and Volta (compute capability 7.0, 7.2) architectures.

Copy link

@spencerpatty spencerpatty left a comment

Choose a reason for hiding this comment

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

approved from Sparse BLAS perspective

@sknepper sknepper merged commit 6fed63e into uxlfoundation:develop Oct 9, 2025
11 of 12 checks passed
@abagusetty abagusetty deleted the cuda_target branch October 10, 2025 03:04
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.

4 participants