Conversion to LLVM becomes confusing and incorrect if someone tries to lower
STD -> LLVM and only then GPULaunchFuncOp to LLVM separately. Although it is
technically allowed now, it works incorrectly because of the argument
promotion. The correct way to use this conversion pattern is to add to the
STD->LLVM patterns before running the pass.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir | ||
---|---|---|
26 | Seems to indicate that the verifier is fairly loose here with respect to the compatibility of the matching between the call site and callee arguments list? |
mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir | ||
---|---|---|
26 | that's true. I don't think there is any verification. GPU module is lowered to a binary blob, which will become a global constant. Then GPU LaunchFuncOp will call the code in that blob. Probably, there is a way to verify arguments before we are in LLVM dialect. |
mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir | ||
---|---|---|
26 | Seems like we won't be able to with launch_func right now, it is a bit uncomfortably lose though. The region based one doesn't suffer from this though. |
Seems to indicate that the verifier is fairly loose here with respect to the compatibility of the matching between the call site and callee arguments list?