[Mlir-commits] [mlir] [MLIR][GPU] Added FoldSelfCopy pattern to gpu memcpy (PR #221216)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Sep 16 05:59:42 PDT 2026
Edward-EJ wrote:
> However, this could be a valid optimization.
Many thanks for your comment and feedback. So I understand correctly, is it the case that since self copies with gpu.memcpy may lead to runtime errors or UB, IR containing a self-copy would be considered invalid? If this is the case, would it appropriate to treat the self copy pattern within the verifier (i.e emit op error if the self copy is present)? Although I expect the self copy pattern to be very rare in practice, with the references you've made to the runtime API in CUDA and HIP it feels like perhaps an error that could be caught earlier.
https://github.com/llvm/llvm-project/pull/221216
More information about the Mlir-commits
mailing list