Skip to content

Commit d0b4172

Browse files
authored
[SYCL][NFC] Remove deprecated variables from LIT (#2794)
Remove use of deprecated environment variables (SYCL_BE, SYCL_DEVICE_TYPE) from LIT framework. Use SYCL_DEVICE_FILTER instead: - rename CMake parameter SYCL_BE to SYCL_PLUGIN to avoid mix-up with deprecated environment variable; - update [CPU|GPU|ACC]_RUN_PLACEHOLDER to use SYCL_DEVICE_FILTER; - change values format used to define a backend and a device type to match SYCL_DEVICE_FILTER requirements; - add BE_RUN_PLACEHOLDER to set backend only for tests which require that; - add RUN_ON_HOST substitution to clearly state target device in RUN command.
1 parent 9cde152 commit d0b4172

135 files changed

Lines changed: 219 additions & 214 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sycl/test/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ list(APPEND SYCL_DEPLOY_TEST_DEPS
4545
add_lit_testsuite(check-sycl-deploy "Running the SYCL regression tests"
4646
${CMAKE_CURRENT_BINARY_DIR}
4747
ARGS ${DEPLOY_RT_TEST_ARGS}
48-
PARAMS "SYCL_BE=PI_OPENCL"
48+
PARAMS "SYCL_PLUGIN=opencl"
4949
DEPENDS ${SYCL_DEPLOY_TEST_DEPS}
5050
EXCLUDE_FROM_CHECK_ALL
5151
)
@@ -58,15 +58,15 @@ add_lit_testsuites(SYCL ${CMAKE_CURRENT_SOURCE_DIR}
5858

5959
add_lit_testsuites(SYCL-DEPLOY ${CMAKE_CURRENT_SOURCE_DIR}
6060
ARGS ${DEPLOY_RT_TEST_ARGS}
61-
PARAMS "SYCL_BE=PI_OPENCL"
61+
PARAMS "SYCL_PLUGIN=opencl"
6262
DEPENDS ${SYCL_DEPLOY_TEST_DEPS}
6363
EXCLUDE_FROM_CHECK_ALL
6464
)
6565

6666
add_lit_testsuite(check-sycl-opencl "Running the SYCL regression tests for OpenCL"
6767
${CMAKE_CURRENT_BINARY_DIR}
6868
ARGS ${RT_TEST_ARGS}
69-
PARAMS "SYCL_BE=PI_OPENCL"
69+
PARAMS "SYCL_PLUGIN=opencl"
7070
DEPENDS ${SYCL_TEST_DEPS}
7171
EXCLUDE_FROM_CHECK_ALL
7272
)
@@ -75,7 +75,7 @@ set_target_properties(check-sycl-opencl PROPERTIES FOLDER "SYCL tests")
7575
add_lit_testsuite(check-sycl-level-zero "Running the SYCL regression tests for Level Zero"
7676
${CMAKE_CURRENT_BINARY_DIR}
7777
ARGS ${RT_TEST_ARGS}
78-
PARAMS "SYCL_BE=PI_LEVEL_ZERO"
78+
PARAMS "SYCL_PLUGIN=level_zero"
7979
DEPENDS ${SYCL_TEST_DEPS}
8080
EXCLUDE_FROM_CHECK_ALL
8181
)
@@ -89,7 +89,7 @@ if(SYCL_BUILD_PI_CUDA)
8989
add_lit_testsuite(check-sycl-cuda "Running the SYCL regression tests for CUDA"
9090
${CMAKE_CURRENT_BINARY_DIR}
9191
ARGS ${RT_TEST_ARGS}
92-
PARAMS "SYCL_BE=PI_CUDA"
92+
PARAMS "SYCL_PLUGIN=cuda"
9393
DEPENDS ${SYCL_TEST_DEPS}
9494
EXCLUDE_FROM_CHECK_ALL
9595
)
@@ -98,7 +98,7 @@ if(SYCL_BUILD_PI_CUDA)
9898
add_dependencies(check-sycl check-sycl-cuda)
9999

100100
add_lit_testsuites(SYCL-CUDA ${CMAKE_CURRENT_SOURCE_DIR}
101-
PARAMS "SYCL_BE=PI_CUDA"
101+
PARAMS "SYCL_PLUGIN=cuda"
102102
DEPENDS ${SYCL_TEST_DEPS}
103103
EXCLUDE_FROM_CHECK_ALL
104104
)

sycl/test/Unit/lit.cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ def find_shlibpath_var():
7373
lit_config.warning("unable to inject shared library path on '{}'"
7474
.format(platform.system()))
7575

76-
config.environment['SYCL_BE'] = lit_config.params.get('SYCL_BE', "PI_OPENCL")
77-
lit_config.note("Backend (SYCL_BE): {}".format(config.environment['SYCL_BE']))
76+
config.environment['SYCL_DEVICE_FILTER'] = lit_config.params.get('SYCL_PLUGIN', "opencl")
77+
lit_config.note("Backend: {}".format(config.environment['SYCL_DEVICE_FILTER']))

sycl/test/atomic_ref/accessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

sycl/test/atomic_ref/add.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

sycl/test/atomic_ref/compare_exchange.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

sycl/test/atomic_ref/exchange.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

sycl/test/atomic_ref/load.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

sycl/test/atomic_ref/max.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

sycl/test/atomic_ref/min.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

sycl/test/atomic_ref/store.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
2+
// RUN: %RUN_ON_HOST %t.out
33

44
#include <CL/sycl.hpp>
55
#include <algorithm>

0 commit comments

Comments
 (0)