MLIR tests in "mlir/test/mlir-cpu-runner" fails in SystemZ (z14) because
of incompatible datalayout error. This patch fixes it by setting host
CPU name in createTargetMachine()
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Without this patch, following tests fail in SystemZ(z14)
MLIR :: mlir-cpu-runner/linalg_integration_test.mlir MLIR :: mlir-cpu-runner/sgemm_naive_codegen.mlir MLIR :: mlir-cpu-runner/simple.mlir MLIR :: mlir-cpu-runner/unranked_memref.mlir MLIR :: mlir-cpu-runner/utils.mlir
Error message is as follows.
Failure value returned from cantFail wrapped call Added modules have incompatible data layouts: E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64 (module) vs E-m:e-i1:8:16-i8:8:16-i64:6\ 4-f128:64-v128:64-a:8:16-n32:64 (jit)
Thanks! I only have a nit about variable naming.
mlir/lib/ExecutionEngine/ExecutionEngine.cpp | ||
---|---|---|
123–132 | MLIR uses camelBack for variables, please change the names |
[mlir][SystemZ] Fix incompatible datalayout in SystemZ
MLIR tests in "mlir/test/mlir-cpu-runner" fails in SystemZ (z14) because
of incompatible datalayout error. This patch fixes it by setting host
CPU name in createTargetMachine()
- [NFC] Replace MaybeAlign with Align in TargetTransformInfo.
- [mlir][SystemZ] Fix incompatible datalayout in SystemZ
mlir/lib/ExecutionEngine/ExecutionEngine.cpp | ||
---|---|---|
123–132 | You should be able to write just std::string cpu = llvm::sys::getHostCPUName();? (Or std::string cpu(llvm::sys::getHostCPUName());) |
mlir/lib/ExecutionEngine/ExecutionEngine.cpp | ||
---|---|---|
123–132 | I write std::string cpu(llvm::sys::getHostCPUName()); because std::string cpu = llvm::sys::getHostCPUName(); issued build error. Thanks for your review! |
@ftynse and @mehdi_amini, Could you help to commit this if this patch ready for commit? I don't have write access to the repository.
MLIR uses camelBack for variables, please change the names