Skip to content

Commit

Permalink
[Mosaic] Fix bug in divisibility check in infer_vector_layout load an…
Browse files Browse the repository at this point in the history
…d store rules

PiperOrigin-RevId: 609876232
  • Loading branch information
tlongeri authored and jax authors committed Feb 24, 2024
1 parent 072b43b commit 61aa7e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaxlib/mosaic/dialect/tpu/transforms/infer_vector_layout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ class VectorLayoutInferer {
tile_offsets.push_back(cast<IntegerAttr>(cst_op.getValue()).getInt() %
tiling[i]);
} else {
if (failed(verifyDivisibleIndex(tiled_index, tiling[0], dim, op))) {
if (failed(verifyDivisibleIndex(tiled_index, tiling[i], dim, op))) {
return failure();
}
tile_offsets.push_back(0);
Expand Down Expand Up @@ -1188,7 +1188,7 @@ class VectorLayoutInferer {
tile_offsets.push_back(cast<IntegerAttr>(cst_op.getValue()).getInt() %
tiling[i]);
} else {
if (failed(verifyDivisibleIndex(tiled_index, tiling[0], dim, op))) {
if (failed(verifyDivisibleIndex(tiled_index, tiling[i], dim, op))) {
return failure();
}
tile_offsets.push_back(0);
Expand Down

0 comments on commit 61aa7e8

Please sign in to comment.