Skip to content

[DT] Support partial load/store for identity encoding resolver. - #22360

Merged
hanhanW merged 1 commit into
iree-org:mainfrom
hanhanW:identity-resolver-partial-slices
Oct 21, 2025
Merged

hanhanW merged 1 commit into
iree-org:mainfrom
hanhanW:identity-resolver-partial-slices

Conversation

@hanhanW

@hanhanW hanhanW commented Oct 20, 2025 •

Copy link
Copy Markdown
Contributor

The revision adds the support of partial load/store lowering for identity encoding resolver; it removes the checks from MaterializeTensorExtDispatchTensorLoadOp and MaterializeTensorExtDispatchTensorStoreOp because they belong to
encoding resolver implementation details.

The data-tiling encoding resolvers all have the check:

// Only handle cases where the slice spans the whole
// `!iree_tensor_ext.dispatch.tensor` type.
// TODO(jornt): Enable partial slices.
if (!type.doesSliceSpanWholeTensor(dynamicDims, offsets, sizes, strides)) {
return failure();
}

The check for padding resolver:

// Only handle cases where the slice spans the whole
// `!iree_tensor_ext.dispatch.tensor` type.
// TODO(hanchung): Enable partial slices. It was copied from pattern's
// implementaion, i.e., the users, and it can be dropped after we move the
// checks to the interface implementations.
if (!type.doesSliceSpanWholeTensor(dynamicDims, offsets, sizes, strides)) {
return failure();
}

@jtuyls jtuyls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// Only handle operations where the load covers the entire
// `!iree_tensor_ext.dispatch.tensor` type.
// TODO(ravishankarm): Relax this for partial loads.
if (!loadOp.isLoadOfWholeSource()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter too much if this PR and #22359 go in close together, but to be completely clean, we should merge #22359 before this PR to make sure that the user checks are there until we add back the implementation check.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, and I plan to do that. Sorry that I forgot to mention it in a comment. :)

@hanhanW hanhanW Oct 21, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD: point it to codebase instead of PR.

I think I can only point it to codebase after I land the padding PR. I'll be more explicit next time.

It removes the checks from MaterializeTensorExtDispatchTensorLoadOp and
MaterializeTensorExtDispatchTensorStoreOp because they belong to
encoding resolver implementation details.

Signed-off-by: hanhanW <[email protected]>
@hanhanW
hanhanW force-pushed the identity-resolver-partial-slices branch from f0d99de to 3225724 Compare October 21, 2025 19:25
@hanhanW
hanhanW enabled auto-merge (squash) October 21, 2025 19:25
@hanhanW
hanhanW disabled auto-merge October 21, 2025 19:25
@hanhanW
hanhanW enabled auto-merge (squash) October 21, 2025 19:26
@hanhanW
hanhanW merged commit bad7c2f into iree-org:main Oct 21, 2025
@hanhanW
hanhanW deleted the identity-resolver-partial-slices branch October 21, 2025 20:01
pstarkcdpr pushed a commit to pstarkcdpr/iree that referenced this pull request Nov 28, 2025
…-org#22360)

The revision adds the support of partial load/store lowering for
identity encoding resolver; it removes the checks from
`MaterializeTensorExtDispatchTensorLoadOp` and
`MaterializeTensorExtDispatchTensorStoreOp` because they belong to
encoding resolver implementation details.

The data-tiling encoding resolvers all have the check:


https://github.com/iree-org/iree/blob/fcae3fcd1f5032a24ca00d913a6f026cb37edcf1/compiler/src/iree/compiler/Codegen/ExternalInterfaces/Utils.h#L136-L141

The check for padding resolver:


https://github.com/iree-org/iree/blob/4127b869cc72b230b56c331e53db7ca71de067b1/compiler/src/iree/compiler/Codegen/ExternalInterfaces/GPUEncodingExternalModels.cpp#L596-L603

Signed-off-by: hanhanW <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants