Skip to content

[SYCL][LIT] Add target to run SYCL LIT tests on OpenCL back-end #2090

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

Merged
merged 3 commits into from
Jul 14, 2020
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
32 changes: 21 additions & 11 deletions sycl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,18 @@ list(APPEND SYCL_DEPLOY_TEST_DEPS
deploy-sycl-toolchain
)

add_lit_testsuite(check-sycl "Running the SYCL regression tests"
${CMAKE_CURRENT_BINARY_DIR}
ARGS ${RT_TEST_ARGS}
PARAMS "SYCL_BE=PI_OPENCL"
DEPENDS ${SYCL_TEST_DEPS}
)

add_lit_testsuite(check-sycl-deploy "Running the SYCL regression tests"
${CMAKE_CURRENT_BINARY_DIR}
ARGS ${DEPLOY_RT_TEST_ARGS}
PARAMS "SYCL_BE=PI_OPENCL"
DEPENDS ${SYCL_DEPLOY_TEST_DEPS}
EXCLUDE_FROM_CHECK_ALL
)
set_target_properties(check-sycl PROPERTIES FOLDER "SYCL tests")
set_target_properties(check-sycl-deploy PROPERTIES FOLDER "SYCL tests")

add_lit_testsuites(SYCL ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${SYCL_TEST_DEPS}
EXCLUDE_FROM_CHECK_ALL
)

add_lit_testsuites(SYCL-DEPLOY ${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -76,29 +70,45 @@ add_lit_target(check-sycl-inline-asm
PARAMS "SYCL_BE=PI_OPENCL"
DEPENDS ${SYCL_TEST_DEPS}
)
set_target_properties(check-sycl-inline-asm PROPERTIES FOLDER "SYCL tests")

add_lit_testsuite(check-sycl-opencl "Running the SYCL regression tests for OpenCL"
${CMAKE_CURRENT_BINARY_DIR}
ARGS ${RT_TEST_ARGS}
PARAMS "SYCL_BE=PI_OPENCL"
DEPENDS ${SYCL_TEST_DEPS}
EXCLUDE_FROM_CHECK_ALL
)
set_target_properties(check-sycl-opencl PROPERTIES FOLDER "SYCL tests")

add_lit_testsuite(check-level0 "Running the SYCL regression tests for Level Zero"
add_lit_testsuite(check-sycl-level0 "Running the SYCL regression tests for Level Zero"
${CMAKE_CURRENT_BINARY_DIR}
ARGS ${RT_TEST_ARGS}
PARAMS "SYCL_BE=PI_LEVEL0"
DEPENDS ${SYCL_TEST_DEPS}
EXCLUDE_FROM_CHECK_ALL
)
set_target_properties(check-sycl-level0 PROPERTIES FOLDER "SYCL tests")

add_dependencies(check-sycl check-level0)
add_custom_target(check-sycl)
add_dependencies(check-sycl check-sycl-opencl check-sycl-level0)
set_target_properties(check-sycl PROPERTIES FOLDER "SYCL tests")

if(SYCL_BUILD_PI_CUDA)
add_lit_testsuite(check-sycl-cuda "Running the SYCL regression tests for CUDA"
${CMAKE_CURRENT_BINARY_DIR}
ARGS ${RT_TEST_ARGS}
PARAMS "SYCL_BE=PI_CUDA"
DEPENDS ${SYCL_TEST_DEPS}
EXCLUDE_FROM_CHECK_ALL
)

set_target_properties(check-sycl-cuda PROPERTIES FOLDER "SYCL CUDA tests")

add_dependencies(check-sycl check-sycl-cuda)

add_lit_testsuites(SYCL-CUDA ${CMAKE_CURRENT_SOURCE_DIR}
PARAMS "SYCL_BE=PI_CUDA"
DEPENDS ${SYCL_TEST_DEPS}
EXCLUDE_FROM_CHECK_ALL
)
endif()