Skip to content

Commit

Permalink
Fix segfault
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 686821923
  • Loading branch information
Google-ML-Automation committed Oct 17, 2024
1 parent 96d5542 commit 9027fb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jaxlib/mosaic/dialect/tpu/transforms/apply_vector_layout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3868,6 +3868,10 @@ LogicalResult vector_multi_reduction_rule(RewriteContext &ctx, Operation &op,
src_layout.tileDataBounds(builder.getContext(), src_shape,
src_idx, ctx.target_shape,
allow_replicated);
if (data_bounds == nullptr) {
// Op error has already been emitted inside tileDataBounds().
return absl::UnknownError("Unable to obtain data bounds");
}
// TODO(tlongeri): Maybe assemble/disassemble should take
// TypedValue<VectorType> and we could save casts here and
// elsewhere
Expand Down

0 comments on commit 9027fb3

Please sign in to comment.