[XLA:Mosaic] No need to assume a multiple of tile if tile dim size is 1.

PiperOrigin-RevId: 642301822
This commit is contained in:
Jevin Jiang 2024-06-11 09:51:45 -07:00 committed by jax authors
parent 27140fe6de
commit 5b38549810

View File

@ -189,6 +189,9 @@ bool isGuaranteedDivisible(Value value, int64_t divisor, int64_t fuel) {
if (fuel <= 0) {
return false;
}
if (divisor == 1) {
return true;
}
if (auto assume_op = value.getDefiningOp<tpu::AssumeMultipleOp>()) {
return assume_op.getMultiple() % divisor == 0;
}