[mlir][tensor] Support padding with poison #152003
Open
+15
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing
In this file
pad_operand
is called byrewriteAsPaddedOp
is called bytransform::PadTilingInterfaceOp::apply
. The only tests that reachpad_operand
in MLIR are for example this test. It's not clear to me how to pass a poison attribute in there though. I've tried passing a string "poison" attribute and it hits logic here. And without a string I can't get poison attribute to parse either. I don't see any examples in the test directory with poison attribute. Is this not a path we can use? i.e. I want an array attribute likepadding_values= [poison, 0.0 : f32]
.In IREE, I can see this works via a less targeted test using
applyPaddingLevel
in this file.