[Mlir-commits] [mlir] [mlir][vector] Implement speculation for vector.transferx ops (PR #111533)

Kunwar Grover llvmlistbot at llvm.org
Tue Oct 8 10:32:03 PDT 2024


Groverkss wrote:

> Thanks for elaborating, that helps!
> 
> > Because executing them speculatively is guaranteed not to have any 'implicit behavior' (side effects / trigger UB / etc.): https://mlir.llvm.org/docs/Rationale/SideEffectsAndSpeculation/#categorization.
> 
> A lot (most?) things in that doc only really matter when dealing with MemRefs. And the implementation here also implies that:
> 
> * when operating on tensors, everything is safe,
> * when operating on memrefs, exercise caution.
> 
> This just makes me wonder, shouldn't LICM be checking for tensor semantics instead?
> 
> > Since linalg.generic/vector.transfer_... ops work on both memref and tensors, they have to be "ConditionallySpeculatable", the condition being if they have memref or tensor semantics.
> 
> Or, we are missing sth like `SpeculableWhenUsingTensorSemantics`.

I think "SpeculableWhenUsingTensorSemantics" is exactly what's missing. Although i'm not sure if it's that simple because we would also need some way of saying when the op has tensor semantics.

https://github.com/llvm/llvm-project/pull/111533


More information about the Mlir-commits mailing list