From 49537981e58cf1d2b6a80033d892a980679703cd Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Fri, 2 Sep 2022 04:24:45 -0700 Subject: [PATCH 1/4] [SYCL] Remove host from supported device types and backends This commit removes the host as both a valid backend and a valid device type in the LIT configuration file. Co-authored-by: Sachkov, Alexey Signed-off-by: Larsen, Steffen --- SYCL/lit.cfg.py | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/SYCL/lit.cfg.py b/SYCL/lit.cfg.py index ad3677770f..4a591e2a9f 100644 --- a/SYCL/lit.cfg.py +++ b/SYCL/lit.cfg.py @@ -238,8 +238,7 @@ if config.dump_ir_supported: config.available_features.add('dump_ir') -supported_sycl_be = ['host', - 'opencl', +supported_sycl_be = ['opencl', 'ext_oneapi_cuda', 'ext_oneapi_hip', 'ext_oneapi_level_zero', @@ -299,11 +298,7 @@ found_at_least_one_device = False -host_run_substitute = "true" -host_run_on_linux_substitute = "true " -host_check_substitute = "" -host_check_on_linux_substitute = "" -supported_device_types=['cpu', 'gpu', 'acc', 'host'] +supported_device_types=['cpu', 'gpu', 'acc'] for target_device in config.target_devices.split(','): if ( target_device not in supported_device_types ): @@ -311,23 +306,6 @@ target_device + "' supported devices are " + ', '.join(supported_device_types)) -if 'host' in config.target_devices.split(','): - found_at_least_one_device = True - lit_config.note("Test HOST device") - host_run_substitute = "env SYCL_DEVICE_FILTER=host " - host_check_substitute = "| FileCheck %s" - config.available_features.add('host') - if platform.system() == "Linux": - host_run_on_linux_substitute = "env SYCL_DEVICE_FILTER=host " - host_check_on_linux_substitute = "| FileCheck %s" -else: - lit_config.warning("HOST device not used") - -config.substitutions.append( ('%HOST_RUN_PLACEHOLDER', host_run_substitute) ) -config.substitutions.append( ('%HOST_RUN_ON_LINUX_PLACEHOLDER', host_run_on_linux_substitute) ) -config.substitutions.append( ('%HOST_CHECK_PLACEHOLDER', host_check_substitute) ) -config.substitutions.append( ('%HOST_CHECK_ON_LINUX_PLACEHOLDER', host_check_on_linux_substitute) ) - cpu_run_substitute = "true" cpu_run_on_linux_substitute = "true " cpu_check_substitute = "" @@ -336,7 +314,7 @@ if 'cpu' in config.target_devices.split(','): found_at_least_one_device = True lit_config.note("Test CPU device") - cpu_run_substitute = "env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:cpu,host ".format(SYCL_PLUGIN=config.sycl_be) + cpu_run_substitute = "env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:cpu ".format(SYCL_PLUGIN=config.sycl_be) cpu_check_substitute = "| FileCheck %s" config.available_features.add('cpu') if platform.system() == "Linux": @@ -359,18 +337,18 @@ if 'gpu' in config.target_devices.split(','): found_at_least_one_device = True lit_config.note("Test GPU device") - gpu_run_substitute = " env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:gpu,host ".format(SYCL_PLUGIN=config.sycl_be) + gpu_run_substitute = " env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:gpu ".format(SYCL_PLUGIN=config.sycl_be) gpu_check_substitute = "| FileCheck %s" config.available_features.add('gpu') if config.sycl_be == "ext_oneapi_level_zero": gpu_l0_check_substitute = "| FileCheck %s" if lit_config.params.get('ze_debug'): - gpu_run_substitute = " env ZE_DEBUG={ZE_DEBUG} SYCL_DEVICE_FILTER=level_zero:gpu,host ".format(ZE_DEBUG=config.ze_debug) + gpu_run_substitute = " env ZE_DEBUG={ZE_DEBUG} SYCL_DEVICE_FILTER=level_zero:gpu ".format(ZE_DEBUG=config.ze_debug) config.available_features.add('ze_debug'+config.ze_debug) if platform.system() == "Linux": - gpu_run_on_linux_substitute = "env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:gpu,host ".format(SYCL_PLUGIN=config.sycl_be) + gpu_run_on_linux_substitute = "env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:gpu ".format(SYCL_PLUGIN=config.sycl_be) gpu_check_on_linux_substitute = "| FileCheck %s" if config.sycl_be == "ext_oneapi_cuda": From 8b804ccf2eda95c5be30b24c062aee96f070b0be Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Thu, 8 Sep 2022 05:57:45 -0700 Subject: [PATCH 2/4] Move sub-device tests to config changes Signed-off-by: Larsen, Steffen --- SYCL/Basic/subdevice.cpp | 5 ----- SYCL/Basic/subsubdevice.cpp | 5 ----- 2 files changed, 10 deletions(-) diff --git a/SYCL/Basic/subdevice.cpp b/SYCL/Basic/subdevice.cpp index d5ef61fbf8..99e37a347f 100644 --- a/SYCL/Basic/subdevice.cpp +++ b/SYCL/Basic/subdevice.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: %HOST_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out @@ -25,10 +24,6 @@ int main() { try { auto devices = device::get_devices(); for (const auto &dev : devices) { - // TODO: implement subdevices creation for host device - if (dev.is_host()) - continue; - assert(dev.get_info() == info::partition_property::no_partition); diff --git a/SYCL/Basic/subsubdevice.cpp b/SYCL/Basic/subsubdevice.cpp index 7e3fd4d2bb..9a794cb48f 100644 --- a/SYCL/Basic/subsubdevice.cpp +++ b/SYCL/Basic/subsubdevice.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: %HOST_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out @@ -25,10 +24,6 @@ int main() { try { auto devices = device::get_devices(); for (const auto &dev : devices) { - // TODO: implement subdevices creation for host device - if (dev.is_host()) - continue; - assert(dev.get_info() == info::partition_property::no_partition); From 68f2ce7f56f4ca9a81e15a55261594e6631921ba Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Fri, 9 Sep 2022 04:13:39 -0700 Subject: [PATCH 3/4] Warn about use of host target device Signed-off-by: Larsen, Steffen --- SYCL/lit.cfg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SYCL/lit.cfg.py b/SYCL/lit.cfg.py index 4a591e2a9f..2efcdeb704 100644 --- a/SYCL/lit.cfg.py +++ b/SYCL/lit.cfg.py @@ -301,7 +301,9 @@ supported_device_types=['cpu', 'gpu', 'acc'] for target_device in config.target_devices.split(','): - if ( target_device not in supported_device_types ): + if ( target_device == 'host') + lit_config.warning("Host device type is no longer supported.") + elif ( target_device not in supported_device_types ): lit_config.error("Unknown SYCL target device type specified '" + target_device + "' supported devices are " + ', '.join(supported_device_types)) From dc4a446915089e54c42763d14984066d11847ffb Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Fri, 9 Sep 2022 05:25:48 -0700 Subject: [PATCH 4/4] Fix wrongful python if-statement Signed-off-by: Larsen, Steffen --- SYCL/lit.cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SYCL/lit.cfg.py b/SYCL/lit.cfg.py index 2efcdeb704..442949bad8 100644 --- a/SYCL/lit.cfg.py +++ b/SYCL/lit.cfg.py @@ -301,7 +301,7 @@ supported_device_types=['cpu', 'gpu', 'acc'] for target_device in config.target_devices.split(','): - if ( target_device == 'host') + if target_device == 'host': lit_config.warning("Host device type is no longer supported.") elif ( target_device not in supported_device_types ): lit_config.error("Unknown SYCL target device type specified '" +