Skip to content

[NFC] remove redundant checks in the TilingInterface - #21225

Merged
bangtianliu merged 1 commit into
iree-org:mainfrom
bangtianliu:nfc_tiling
Jun 27, 2025
Merged

bangtianliu merged 1 commit into
iree-org:mainfrom
bangtianliu:nfc_tiling

Conversation

@bangtianliu

Copy link
Copy Markdown
Contributor

Per discussion here: #21077 (comment)

Due to assert false here for default branch:

Operation *getSlice(OpBuilder &b, Location loc, Value src,
ArrayRef<OpFoldResult> offsets,
ArrayRef<OpFoldResult> sizes,
ArrayRef<OpFoldResult> strides) {
return TypeSwitch<Type, Operation *>(src.getType())
.Case<RankedTensorType>([&](RankedTensorType t) -> Operation * {
return b.create<tensor::ExtractSliceOp>(loc, src, offsets, sizes,
strides);
})
.Case<MemRefType>([&](MemRefType type) -> Operation * {
return b.create<memref::SubViewOp>(loc, src, offsets, sizes, strides);
})
.Default([&](Type t) -> Operation * {
assert(false && "invalid type");
return nullptr;
});
}
, the failure failing afterward is not required and can be removed.

Signed-off-by: Bangtian Liu <[email protected]>

@hanhanW hanhanW 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.

thanks!

@bangtianliu
bangtianliu merged commit ede897a into iree-org:main Jun 27, 2025
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.

3 participants