From a319ba008f49c612e12ece4894117beab7f8fc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Scipione?= Date: Tue, 25 Jun 2024 02:50:18 -0700 Subject: [PATCH] [BLAS][EXAMPLE] Enable RT example for portBLAS backend (#521) --- .../blas/run_time_dispatching/level3/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/blas/run_time_dispatching/level3/CMakeLists.txt b/examples/blas/run_time_dispatching/level3/CMakeLists.txt index 11ba79ca2..d0d35fc0d 100644 --- a/examples/blas/run_time_dispatching/level3/CMakeLists.txt +++ b/examples/blas/run_time_dispatching/level3/CMakeLists.txt @@ -40,6 +40,19 @@ endif() if(ENABLE_ROCBLAS_BACKEND) list(APPEND DEVICE_FILTERS "hip:gpu") endif() +if(ENABLE_PORTBLAS_BACKEND) + if(PORTBLAS_TUNING_TARGET) + if(PORTBLAS_TUNING_TARGET MATCHES "INTEL_CPU") + list(APPEND DEVICE_FILTERS "opencl:cpu") + elseif(PORTBLAS_TUNING_TARGET MATCHES "_GPU") + list(APPEND DEVICE_FILTERS "*:gpu") + endif() + else() + # portBLAS default sycl-target is spir64, testing runtime on both supported + # devices. + list(APPEND DEVICE_FILTERS "opencl:cpu;level_zero:gpu") + endif() +endif() message(STATUS "ONEAPI_DEVICE_SELECTOR will be set to the following value(s): [${DEVICE_FILTERS}] for run-time dispatching examples")