I’m fairly new to LLVM/MLIR so please pardon if I sound naïve but while working with
memref dialect I came across a scenario where I was trying to copy a
memref into another
memref with the same size but different shape and even rank, I was able to get past this problem initially by removing the
SameOperandsShape constraint on CopyOp but that is obviously not the solution hence was wondering what is the recommendation for this scenario? I have to maintain the shape as it is because in this case the data is being transferred between two different memory spaces that have different stride multiple constrains, etc.
Does it warrant creating a variant of CopyOp that is relaxed on the shape constraint but verifies strides and shape alignment using some sort of AffineMap?