[Mlir-commits] [mlir] [mlir][spirv] Add spirv validation for module.mlir target test (PR #153227)
Igor Wodiany
llvmlistbot at llvm.org
Thu Aug 14 00:37:27 PDT 2025
IgWod-IMG wrote:
I had to replace:
```
// RUN: %if spirv-tools %{ mkdir %t && mlir-translate --no-implicit-module --serialize-spirv \ %}
// RUN: %if spirv-tools %{ --split-input-file --spirv-save-validation-files-with-prefix=%t/module %s \ %}
// RUN: %if spirv-tools %{ && ls %t/module* | xargs -I{} spirv-val {} %}
```
with the code below, where every command occupies a single `RUN` line. This makes `mlir-translate` to go over the ~80 character limit, however there seem to be issues when conditional substitution and line splitting (`\`) are used together - shell parser keep tripping over (e.g., ` shell parser error on RUN: at line 7: && ls /home/user/build-debug/tools/mlir/test/Target/SPIRV/Output/module.mlir.tmp/module*.spv | xargs -I{}/home/user/build-debug/./bin/spirv-val {}`).
```
// RUN: %if spirv-tools %{ mkdir %t %}
// RUN: %if spirv-tools %{ mlir-translate --no-implicit-module --serialize-spirv --split-input-file --spirv-save-validation-files-with-prefix=%t/module %s %}
// RUN: %if spirv-tools %{ ls %t/module*.spv | xargs -I{} spirv-val {} %}
```
https://github.com/llvm/llvm-project/pull/153227
More information about the Mlir-commits
mailing list