From 16ff4ff9c3a88aba0390aba70d300ea90d369feb Mon Sep 17 00:00:00 2001 From: "Lee, Sang Ik" Date: Wed, 28 May 2025 18:08:58 +0000 Subject: [PATCH] Use mlir_sycl_runtime for XeVM integration tests. mlir_spirv_runtime is needed if IMEX SPIR-V backend is enabled. Add mlir-runner as test dependency for future usage. --- test/CMakeLists.txt | 3 ++- test/Integration/Dialect/XeGPUToXeVM/loadstore_nd.mlir | 4 ++-- test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_dpas.mlir | 4 ++-- .../Dialect/XeGPUToXeVM/loadstore_nd_prefetch.mlir | 4 ++-- .../Dialect/XeGPUToXeVM/loadstore_nd_update_offset.mlir | 4 ++-- .../Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1.mlir | 4 ++-- .../loadstore_scatter_chunk_size_1_non_contig_offsets.mlir | 4 ++-- .../loadstore_scatter_chunk_size_1_update_offset.mlir | 4 ++-- .../Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_2.mlir | 4 ++-- test/Integration/Dialect/XeVM/xevm_block_dpas.mlir | 4 ++-- test/Integration/Dialect/XeVM/xevm_block_load_store.mlir | 4 ++-- .../Dialect/XeVM/xevm_block_load_store_transpose.mlir | 4 ++-- test/Integration/Dialect/XeVM/xevm_block_load_store_vnni.mlir | 4 ++-- test/Integration/Dialect/XeVM/xevm_store_cst.mlir | 4 ++-- tools/imex-runner/imex-runner.py.in | 2 +- 15 files changed, 29 insertions(+), 28 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 679b2ab4d..d473f399f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,6 +6,7 @@ endif() set(IMEX_TEST_DEPENDS imex-opt imex-cpu-runner + mlir-runner mlir_c_runner_utils mlir_runner_utils imex_runner_utils @@ -46,7 +47,7 @@ if(IMEX_ENABLE_VULKAN_RUNNER) ) endif() -if(IMEX_ENABLE_SYCL_RUNTIME) +if(IMEX_SPIRV_BACKEND_ENABLED) list(APPEND IMEX_TEST_DEPENDS mlir_sycl_runtime ) diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd.mlir index f17aadd24..605df1801 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_dpas.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_dpas.mlir index 01d6eb293..e22307466 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_dpas.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_dpas.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck #sg_map_a_f16 = #xegpu.layout #sg_map_b_f16 = #xegpu.layout diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_prefetch.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_prefetch.mlir index 60c1c841d..fe783508f 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_prefetch.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_prefetch.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_update_offset.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_update_offset.mlir index 90825d666..1dbbc63a2 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_update_offset.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_nd_update_offset.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1.mlir index 1ecb6dc1d..a66555ee9 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_non_contig_offsets.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_non_contig_offsets.mlir index 1613d8843..f52a9542e 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_non_contig_offsets.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_non_contig_offsets.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_update_offset.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_update_offset.mlir index 2b48d40ae..c11bf88a5 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_update_offset.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_1_update_offset.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_2.mlir b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_2.mlir index d39d0a312..d1a1ed227 100644 --- a/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_2.mlir +++ b/test/Integration/Dialect/XeGPUToXeVM/loadstore_scatter_chunk_size_2.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xegpu-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { gpu.func @load_store_2d(%src: memref<128xf32, 1>, %dst: memref<128xf32, 1>) kernel { diff --git a/test/Integration/Dialect/XeVM/xevm_block_dpas.mlir b/test/Integration/Dialect/XeVM/xevm_block_dpas.mlir index 50d62dc6e..b02199171 100644 --- a/test/Integration/Dialect/XeVM/xevm_block_dpas.mlir +++ b/test/Integration/Dialect/XeVM/xevm_block_dpas.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeVM/xevm_block_load_store.mlir b/test/Integration/Dialect/XeVM/xevm_block_load_store.mlir index b97d827f1..507d0c532 100644 --- a/test/Integration/Dialect/XeVM/xevm_block_load_store.mlir +++ b/test/Integration/Dialect/XeVM/xevm_block_load_store.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { diff --git a/test/Integration/Dialect/XeVM/xevm_block_load_store_transpose.mlir b/test/Integration/Dialect/XeVM/xevm_block_load_store_transpose.mlir index b8ed17b63..91a420769 100644 --- a/test/Integration/Dialect/XeVM/xevm_block_load_store_transpose.mlir +++ b/test/Integration/Dialect/XeVM/xevm_block_load_store_transpose.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeVM/xevm_block_load_store_vnni.mlir b/test/Integration/Dialect/XeVM/xevm_block_load_store_vnni.mlir index c4840e555..750352813 100644 --- a/test/Integration/Dialect/XeVM/xevm_block_load_store_vnni.mlir +++ b/test/Integration/Dialect/XeVM/xevm_block_load_store_vnni.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { gpu.module @kernel { diff --git a/test/Integration/Dialect/XeVM/xevm_store_cst.mlir b/test/Integration/Dialect/XeVM/xevm_store_cst.mlir index edf6575dd..60b3b042c 100644 --- a/test/Integration/Dialect/XeVM/xevm_store_cst.mlir +++ b/test/Integration/Dialect/XeVM/xevm_store_cst.mlir @@ -1,7 +1,7 @@ -// RUN: %python_executable %imex_runner --requires=l0-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ +// RUN: %python_executable %imex_runner --requires=sycl-runtime,spirv-backend -i %s --pass-pipeline-file=%p/xevm-to-llvm.pp \ // RUN: --runner imex-cpu-runner -e main \ // RUN: --entry-point-result=void \ -// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%levelzero_runtime --filecheck +// RUN: --shared-libs=%irunner_utils,%mlir_runner_utils,%mlir_c_runner_utils,%mlir_sycl_runtime --filecheck module @gemm attributes {gpu.container_module} { diff --git a/tools/imex-runner/imex-runner.py.in b/tools/imex-runner/imex-runner.py.in index a630b0758..eb1ea22e8 100644 --- a/tools/imex-runner/imex-runner.py.in +++ b/tools/imex-runner/imex-runner.py.in @@ -55,7 +55,7 @@ imex_enable_l0_runtime = @IMEX_ENABLE_L0_RUNTIME@ imex_enable_sycl_runtime = @IMEX_ENABLE_SYCL_RUNTIME@ imex_enable_spirv_backend = @IMEX_SPIRV_BACKEND_ENABLED@ -runner_choices = ['imex-cpu-runner'] +runner_choices = ['imex-cpu-runner', 'mlir-runner'] enabled_features = [] all_features = ['vulkan-runner', 'l0-runtime', 'sycl-runtime', 'igpu-fp64', 'spirv-backend'] if imex_enable_vulkan_runner: