Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate LLVM at llvm/llvm-project@8955e285e1 #18010

Closed
wants to merge 4 commits into from

Conversation

ScottTodd
Copy link
Member

@ScottTodd ScottTodd commented Jul 25, 2024

Advance to llvm/llvm-project@8955e285e1

…or] Add a test of <2x[4]xf32> type on lowering multireduction (#100451) (Zhaoshi Zheng on 2024-07-25 13:39:57 -0700) (17 of 18)
…property combinators, initial ODS support (#94732) (Krzysztof Drewniak on 2024-07-26 09:35:06 -0500) (5 of 6)
@ScottTodd ScottTodd changed the title Integrate LLVM at llvm/llvm-project@cb7d4a187a Integrate LLVM at llvm/llvm-project@8955e285e1 Jul 26, 2024
@ScottTodd
Copy link
Member Author

Putting this on hold for a little bit. Full debug chats here on Discord.

Issues encountered:

CUDA Translation failed for operation: builtin.unrealized_conversion_cast

Logs: https://github.com/iree-org/iree/actions/runs/10113405122/job/27970714347?pr=18010#step:9:55

<unknown>:0: error: LLVM Translation failed for operation: builtin.unrealized_conversion_cast
<unknown>:0: note: see current operation: %71 = "builtin.unrealized_conversion_cast"(%70) : (!llvm.array<1 x vector<1xf32>>) -> vector<1x1xf32>
model.mlir:7:10: error: failed to translate the MLIR LLVM dialect to the native llvm::Module

Repro: this input file and iree-compile model.mlir --iree-hal-target-backends=cuda -o /tmp/model_gpu_cuda.vmfb

Culprit: llvm/llvm-project@f6431f0

Removing LLVM::FMAOp from the target.addIllegalOp<...> block in mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp fixes compilation. I suggest debugging around

RewritePatternSet llvmPatterns(&getContext());
populateLowerHALInterfaceOp(llvmPatterns);
populateLLVMConversionPatterns(&getContext(), llvmPatterns, converter);
populateComplexToLLVMConversionPatterns(converter, llvmPatterns);
populateMathToLLVMConversionPatterns(converter, llvmPatterns);
memref::populateExpandStridedMetadataPatterns(llvmPatterns);
populateFinalizeMemRefToLLVMConversionPatterns(converter, llvmPatterns);
populateFuncToLLVMConversionPatterns(converter, llvmPatterns);
cf::populateControlFlowToLLVMConversionPatterns(converter, llvmPatterns);
arith::populateArithToLLVMConversionPatterns(converter, llvmPatterns);
populateVectorToLLVMConversionPatterns(converter, llvmPatterns);
populateGpuToNVVMConversionPatterns(converter, llvmPatterns);
populateNVGPUToNVVMConversionPatterns(converter, llvmPatterns);
populateGpuWMMAToNVVMConversionPatterns(converter, llvmPatterns);
LLVMConversionTarget target(getContext());
configureGpuToNVVMConversionLegality(target);
if (failed(applyPartialConversion(m, target, std::move(llvmPatterns)))) {
signalPassFailure();
}

Perhaps some of the patterns there are overlapping or running in the wrong order (change pattern benefit?)


iree/compiler/Codegen/SPIRV/test/vectorize_load_store.mlir.test

Logs: https://github.com/iree-org/iree/actions/runs/10113405115/job/27969720942?pr=18010#step:5:1720

+ iree-opt --split-input-file '--pass-pipeline=builtin.module(func.func(iree-spirv-vectorize-load-store, canonicalize, cse))' --mlir-print-local-scope /work/compiler/src/iree/compiler/Codegen/SPIRV/test/vectorize_load_store.mlir
+ FileCheck /work/compiler/src/iree/compiler/Codegen/SPIRV/test/vectorize_load_store.mlir
iree-opt: /work/third_party/llvm-project/llvm/include/llvm/Support/Casting.h:566: decltype(auto) llvm::cast(const From &) [To = mlir::VectorType, From = mlir::Type]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

Might relate to llvm/llvm-project@bbd4af5


iree/compiler/Codegen/LLVMGPU/test/set_transform_strategy_pad.mlir.test

lit test failure


iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir.test

lit test failure

@ScottTodd
Copy link
Member Author

Started a smaller integrate at #18016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants