Skip to content

Commit

Permalink
[Mosaic:TPU] Fix bug after cl/707025084
Browse files Browse the repository at this point in the history
`tile_masks` was updated to use implicit, but we skipped the reshape for `tiles`

Seems like there was even a bug before cl/707025084: `tile_masks` was never reshaped, so if the shape was 1D and a store mask was specified, there would be a mismatch in dimensions.

PiperOrigin-RevId: 707183025
  • Loading branch information
tlongeri authored and Google-ML-Automation committed Dec 17, 2024
1 parent 0fa5419 commit 5b12c29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4397,7 +4397,7 @@ LogicalResult vector_store_impl(RewriteContext &ctx, Op store_op,
FAILUREOR_ASSIGN_OR_RETURN(
xla::Array<Value> tiles,
disassemble(builder, to_store_layout, store_op.getValueToStore(),
ctx.target_shape));
ctx.target_shape, /*use_implicit_shape=*/true));
std::optional<xla::Array<Value>> tile_masks;
if (store_mask) {
FAILUREOR_ASSIGN_OR_RETURN(
Expand Down

0 comments on commit 5b12c29

Please sign in to comment.