Skip to content

Commit b665f5d

Browse files
authored
[CI][Testing] Fix running simt xegpu script in the pre-built llvm mode (#1160)
1 parent a3f30a3 commit b665f5d

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,18 @@ if(LINUX)
3838
endif()
3939

4040

41-
string(FIND "${LLVM_TARGETS_TO_BUILD}" "SPIRV" SPIRV_FOUND)
42-
if(SPIRV_FOUND GREATER -1)
43-
message(STATUS "SPIRV is part of the LLVM targets")
41+
42+
if (MLIR_SPIRV_BACKEND_ENABLED)
4443
set(MLIR_SPIRV_BACKEND_ENABLED 1)
4544
else()
46-
message(STATUS "SPIRV is not part of the LLVM targets")
47-
set(MLIR_SPIRV_BACKEND_ENABLED 0)
45+
string(FIND "${LLVM_TARGETS_TO_BUILD}" "SPIRV" SPIRV_FOUND)
46+
if(SPIRV_FOUND GREATER -1)
47+
message(STATUS "SPIRV is part of the LLVM targets")
48+
set(MLIR_SPIRV_BACKEND_ENABLED 1)
49+
else()
50+
message(STATUS "SPIRV is not part of the LLVM targets")
51+
set(MLIR_SPIRV_BACKEND_ENABLED 0)
52+
endif()
4853
endif()
4954

5055
# option(IMEX_BUILD_SPIRV_BACKEND "Append SPIRV to LLVM_TARGETS_TO_BUILD" ON)

scripts/run_xegpu_simt_integration_tests.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,22 @@ else
299299
# User provided a specific test filter
300300
LIT_FILTER="$TEST_NAME_FILTER"
301301
print_info "Using custom test filter: $LIT_FILTER"
302-
LLVM_LIT_ARGS_OPTION="-DLLVM_LIT_ARGS=-v --filter='$LIT_FILTER'"
303302
else
304-
# No filter for out-of-tree build by default
305-
LLVM_LIT_ARGS_OPTION=""
303+
# Default: all XeGPU integration test directories (same as source build)
304+
LIT_FILTER="Integration/Dialect/XeGPU/SG|Integration/Dialect/XeGPU/WG|Integration/Dialect/XeGPU/SIMT|Integration/Dialect/XeVM"
305+
print_info "Using default test filter for XeGPU integration tests"
306306
fi
307307

308308
cmake -S . -B "$BUILD_DIR" -G Ninja \
309309
-DCMAKE_BUILD_TYPE=Release \
310310
-DMLIR_DIR="$MLIR_CMAKE_DIR" \
311311
-DIMEX_ENABLE_L0_RUNTIME=1 \
312+
-DMLIR_ENABLE_LEVELZERO_RUNNER=1 \
313+
-DMLIR_ENABLE_SYCL_RUNNER=1 \
314+
-DMLIR_SPIRV_BACKEND_ENABLED=1 \
312315
-DIMEX_BUILD_VC_CONVERSIONS=OFF \
313316
-DIMEX_ENABLE_XEGPU_LAYOUT_PASSES=OFF \
314-
$LLVM_LIT_ARGS_OPTION
317+
-DLLVM_LIT_ARGS="-v --filter='$LIT_FILTER'"
315318
fi
316319

317320
if [ $? -eq 0 ]; then

0 commit comments

Comments
 (0)