Skip to content
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

Run fuzz test with L0 when available #838

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions test/fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ function(add_fuzz_test name label)
add_test(NAME ${TEST_TARGET_NAME}
COMMAND ${TEST_TARGET_NAME} ${ARGN} -verbosity=1
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

set(ENV_VARS UR_ENABLE_LAYERS=UR_LAYER_FULL_VALIDATION)
if (UR_BUILD_ADAPTER_L0)
list(APPEND ENV_VARS
UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_level_zero>\"
NEOReadDebugKeys=1
pbalcer marked this conversation as resolved.
Show resolved Hide resolved
DisableDeepBind=1)
else()
list(APPEND ENV_VARS UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_null>\")
endif()
set_tests_properties(${TEST_TARGET_NAME} PROPERTIES
LABELS ${label}
ENVIRONMENT
"UR_ENABLE_LAYERS=UR_LAYER_FULL_VALIDATION;UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_null>\"")

ENVIRONMENT "${ENV_VARS}")
# TODO: Should we check if this sanitizer flag is available?
target_compile_options(${TEST_TARGET_NAME} PRIVATE -g -fsanitize=fuzzer)
target_compile_definitions(${TEST_TARGET_NAME} PRIVATE -DKERNEL_IL_PATH="${UR_CONFORMANCE_DEVICE_BINARIES_DIR}/bar/sycl_spir641.spv")
Expand Down