mirror of
https://github.com/ROCm/jax.git
synced 2025-04-19 05:16:06 +00:00
[Mosaic] apply_vector_layout C++ rewrite: Fix check for defining layout in disassemble
Though `relayout` would guarantee `equivalentTo` holding true, we skip relayout when the source layout generalizes the dest layout (because it's a no-op). PiperOrigin-RevId: 572095024
This commit is contained in:
parent
4c306381c9
commit
f2cda736a9
@ -2691,7 +2691,7 @@ FailureOr<xla::Array<Value>> disassemble(RewriteContext &ctx,
|
||||
getOutLayout(*op));
|
||||
const Layout def_layout = def_layouts[res_idx];
|
||||
CHECK(def_layout.has_value());
|
||||
CHECK(def_layout->equivalentTo(layout, std::nullopt, ctx.target_shape));
|
||||
CHECK(def_layout->generalizes(layout, vty.getShape(), ctx.target_shape));
|
||||
SmallVector<int64_t> layout_shape =
|
||||
layout.tileArrayShape(vty.getShape(), ctx.target_shape);
|
||||
if (auto roll_vectors_op = dyn_cast<RollVectorsOp>(op)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user