Repository navigation
[DT][NFCI] Implement getOffsetsSizesStrides for GPU padding resolver. - #22339
Conversation
The revision implement the interface method with the existing logic; it allows us to remove padding specific load/store patterns, because they use interfaces. No new tests are added since it aims to be a refactor PR and tests should be covered by [materialize_encoding_into_padding.mlir](https://github.com/iree-org/iree/blob/3b1730e5fa15a520505000b3f3232bd2a230793b/compiler/src/iree/compiler/Codegen/Common/test/materialize_encoding_into_padding.mlir) Signed-off-by: hanhanW <[email protected]>
0209993 to
f71303b
Compare
| materializeEncodingPattern.add<MaterializeFlowDispatchTensorLoadOp, | ||
| MaterializeFlowDispatchTensorStoreOp, | ||
| MaterializeInterfaceBindingEncoding>( | ||
| materializeEncodingPattern.add<MaterializeInterfaceBindingEncoding>( |
There was a problem hiding this comment.
The removal of MaterializeInterfaceBindingEncoding requires some more work; I'll work on it in a follow-up.
There was a problem hiding this comment.
Then we should be closer to retire the pass.
Signed-off-by: hanhanW <[email protected]>
| if (!boundType || !boundType.getEncoding()) { | ||
| return failure(); | ||
| } | ||
| newSizes = getMixedValues(boundType.getShape(), dynamicDims, builder); |
There was a problem hiding this comment.
Same comment as on the IdentityEncoding PR, but I think that we should check whether the provided offsets, sizes and strides, span the whole tensor?
There was a problem hiding this comment.
My understanding about the attribute is that they don't transfer the actual sizes/offsets/strides, so it is okay to remove the check. However, I understand that the tests are missing because of the current pattern implmenetations, so I'm okay with adding it back. See #22337 (comment) for details.
There was a problem hiding this comment.
#22359 should address your concern, thanks for catching it!
…iree-org#22339) The revision implements the interface method with the existing logic; it allows us to remove padding specific load/store patterns, because they use interfaces. No new tests are added since it aims to be a refactor PR and tests should be covered by [materialize_encoding_into_padding.mlir](https://github.com/iree-org/iree/blob/3b1730e5fa15a520505000b3f3232bd2a230793b/compiler/src/iree/compiler/Codegen/Common/test/materialize_encoding_into_padding.mlir) It is a step towards iree-org#20160 --------- Signed-off-by: hanhanW <[email protected]> Signed-off-by: Philipp <[email protected]>
…iree-org#22339) The revision implements the interface method with the existing logic; it allows us to remove padding specific load/store patterns, because they use interfaces. No new tests are added since it aims to be a refactor PR and tests should be covered by [materialize_encoding_into_padding.mlir](https://github.com/iree-org/iree/blob/3b1730e5fa15a520505000b3f3232bd2a230793b/compiler/src/iree/compiler/Codegen/Common/test/materialize_encoding_into_padding.mlir) It is a step towards iree-org#20160 --------- Signed-off-by: hanhanW <[email protected]>
The revision implement the interface method with the existing logic; it allows us to remove padding specific load/store patterns, because they use interfaces.
No new tests are added since it aims to be a refactor PR and tests should be covered by materialize_encoding_into_padding.mlir
It is a step towards #20160