[Mlir-commits] [mlir] [mlir][spirv] Fix int type declaration duplication when serializing (PR #143108)
Davide Grohmann
llvmlistbot at llvm.org
Wed Jun 11 03:14:17 PDT 2025
davidegrohmann wrote:
> Have you checked that the spirv tools invocation works as expected and fails to validate without your fix? I haven't tried it myself, so I'm not sure if it has to be enabled somewhere in cmake etc.
I was hoping that to work out of the box since there are also other tests in the same folder using the same spirv-tools configuration, for example: `mlir/test/Target/SPIRV/consecutive-selection.spv` and `mlir/test/Target/SPIRV/selection.spv`
In any case I have tried to make it work locally without success. I have built everything enabling the SPIRV target and enable the SPIRV tests by adding `-DLLVM_TARGETS_TO_BUILD='host;SPIRV'` and `-DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON`
Full command:
```
cmake -G Ninja -B build -S llvm
-DLLVM_ENABLE_PROJECTS=mlir
-DLLVM_TARGETS_TO_BUILD='host;SPIRV'
-DCMAKE_BUILD_TYPE=Release
-DLLVM_REQUIRES_RTTI=ON
-DLLVM_REQUIRES_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_ASSERTIONS=ON
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
-DMLIR_INCLUDE_INTEGRATION_TESTS=ON
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON
```
Any ideas what am I missing?
In any case I have manually tested that the command `mlir-translate -no-implicit-module -serialize-spirv %s | spirv-val` works for `mlir/test/Target/SPIRV/constant.mlir`
https://github.com/llvm/llvm-project/pull/143108
More information about the Mlir-commits
mailing list