[CUDA] Add more ways finding CCCL headers in JIT (#2382)

This commit is contained in:
Cheng
2025-07-18 07:25:34 +09:00
committed by GitHub
parent fbb3f65a1a
commit 31fc530c76
2 changed files with 34 additions and 9 deletions

View File

@@ -39,6 +39,14 @@ target_sources(
linalg_tests.cpp
${METAL_TEST_SOURCES})
if(MLX_BUILD_CUDA)
# Find the CCCL headers in install dir.
target_compile_definitions(
mlx
PRIVATE
MLX_CCCL_DIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/cccl")
endif()
target_link_libraries(tests PRIVATE mlx doctest)
doctest_discover_tests(tests)
add_test(NAME tests COMMAND tests)