Skip to content

Commit

Permalink
Merge pull request #2581 from kswiecicki/l0v2-deferred-tests-if-fix
Browse files Browse the repository at this point in the history
[L0 v2] Add dependency on UR_DPCXX for kernel tests
  • Loading branch information
pbalcer authored Jan 20, 2025
2 parents 8b7a995 + 4ef9779 commit 4347037
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions test/adapters/level_zero/v2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,32 @@ add_adapter_test(level_zero_memory_residency
)

if(NOT WIN32)
add_adapter_test(level_zero_deferred_kernel
FIXTURE KERNELS
SOURCES
deferred_kernel.cpp
ENVIRONMENT
"UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_level_zero_v2>\""
)
if (NOT UR_DPCXX)
# Tests that require kernels can't be used if we aren't generating
# device binaries
message(WARNING
"UR_DPCXX is not defined, skipping some tests for level_zero_v2 adapter")
else()
add_adapter_test(level_zero_deferred_kernel
FIXTURE KERNELS
SOURCES
deferred_kernel.cpp
ENVIRONMENT
"UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_level_zero_v2>\""
)

set(backend level_zero)
add_adapter_memcheck_test(level_zero_deferred_kernel
FIXTURE KERNELS
SOURCES
deferred_kernel.cpp
ENVIRONMENT
"UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_level_zero_v2>\""
)
set(backend level_zero)
add_adapter_memcheck_test(level_zero_deferred_kernel
FIXTURE KERNELS
SOURCES
deferred_kernel.cpp
ENVIRONMENT
"UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_level_zero_v2>\""
)

target_link_libraries(test-adapter-level_zero_deferred_kernel PRIVATE
LevelZeroLoader
LevelZeroLoader-Headers
)
target_link_libraries(test-adapter-level_zero_deferred_kernel PRIVATE
LevelZeroLoader
LevelZeroLoader-Headers
)
endif()
endif()

0 comments on commit 4347037

Please sign in to comment.