Skip to content

[Codegen] Migrate InnerTiles to VectorizableOpInterface.#23767

Open
hanhanW wants to merge 2 commits intomainfrom
users/hanhanW/vec-iface-c5
Open

[Codegen] Migrate InnerTiles to VectorizableOpInterface.#23767
hanhanW wants to merge 2 commits intomainfrom
users/hanhanW/vec-iface-c5

Conversation

@hanhanW
Copy link
Contributor

@hanhanW hanhanW commented Mar 12, 2026

The revision moves the implementation to interface and retires the VectorizeIREEGPUOps pass.

The pass and the location of the implementation were not moved during IREEGPU -> IREECodegen move, so they looks wrong.

The revision moves the implementation to interface and retires the
VectorizeIREEGPUOps pass.

The pass and the location of the implementation were not moved during
IREEGPU -> IREECodegen move, so they looks wrong.

Signed-off-by: hanhanW <[email protected]>

SmallVector<ShapedType> argTypes = tiledOp.getOperandShapedTypes();

// Construct the (never used) zero padding value for each operand.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is right. If the outer dimensions were dynamic I think the padding value would be used (inner dimensions are forced static). I suspect to be exceedingly correct we'd need the InnerTile interface to return the padding value to use, but I'm guessing this is a pre-existing issue so just updating the comment is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it's a pre-existing issue. Let me update the comment.

// Construct the (never used) zero padding value for each operand.
SmallVector<Value> padValues =
llvm::map_to_vector(argTypes, [&](ShapedType argType) -> Value {
return arith::ConstantOp::create(
rewriter, loc, rewriter.getZeroAttr(argType.getElementType()));
});

Signed-off-by: hanhanW <[email protected]>
Comment on lines +1238 to +1241
// CHECK-MASK-LABEL: func @tensor_multi_mma
// CHECK-FOLD-LABEL: func @tensor_multi_mma
// CHECK-GATHER-LABEL: func @tensor_multi_mma
// CHECK-MAP-STORE-LABEL: func @tensor_multi_mma
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose of this? Avoid false matches for check lines above?

Comment on lines +908 to +909
/*vector=*/result,
/*source=*/tensorAcc,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

Suggested change
/*vector=*/result,
/*source=*/tensorAcc,
/*valueToStore=*/result,
/*base=*/tensorAcc,

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