[Mosaic TPU] Propagate the memory space change for memref bitcast and reshape.

PiperOrigin-RevId: 674067380
This commit is contained in:
Jevin Jiang 2024-09-12 17:13:46 -07:00 committed by jax authors
parent 178fb03050
commit 8d93e101b9

View File

@ -78,6 +78,14 @@ LogicalResult specializeMemorySpace(TypedValue<MemRefType> value,
updateResultFrom(op, op.getInput().getType());
continue;
}
if (auto op = dyn_cast<tpu::MemRefBitcastOp>(some_op)) {
updateResultFrom(op, op.getInput().getType());
continue;
}
if (auto op = dyn_cast<tpu::MemRefReshapeOp>(some_op)) {
updateResultFrom(op, op.getInput().getType());
continue;
}
if (auto op = dyn_cast<tpu::EraseLayoutOp>(some_op)) {
updateResultFrom(op, op.getOperand().getType());
continue;