You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CPU][DT] Failed to compile toy_llama.mlir using data-tiling fusion #21197
.../z2.mlir:635:19: error: 'tensor.expand_shape' op expected number of static shape dims to be equal to the output rank (4) but found 0 inputs instead
%collapsed_12 = tensor.collapse_shape %expanded_9 [[0], [1], [2], [3, 4]] : tensor<4x2x?x?x32xf16> into tensor<4x2x?x?xf16>
^
.../z2.mlir:635:19: note: see current operation: %90 = "tensor.expand_shape"(%88) <{reassociation = [[0, 1, 2, 3]], static_output_shape = array<i64>}>: (tensor<?xf16>) -> tensor<4x2x?x?xf16>
changed the title [-][CPU][DT] Failed to compile toy_llama.mlir in CPU data-tiling fusion path[/-][+][CPU][DT] Failed to compile toy_llama.mlir using data-tiling fusion[/+]on Jun 26, 2025
Some of them are not compilable, e.g., configured_module_prefill_bs1$async_dispatch_17.mlir. For this case, it may be related to #20786, where the generic op consumer is not fused. So it creates a large temp buffer to hold the data and pass it to the generic op.
To repro: iree-compile --compile-from=executable-sources --compile-to=executable-targets configured_module_prefill_bs1$async_dispatch_17.mlir.mlir
Activity
hanhanW commentedon Jun 26, 2025
It seems to be a bug in one of the canonicalization patterns:
IR dump after CollapseDimension pass: https://gist.github.com/hanhanW/9d6bb7f168f2ef7b2fa51e34d098f203
To repro:
iree-opt --canonicalize ~/z2.mlirError:
hanhanW commentedon Jun 26, 2025
There may be other issues in the later phase, the issue is for tracking the compilation issue for toy_llama on CPU data-tiling fusion path.
[-][CPU][DT] Failed to compile toy_llama.mlir in CPU data-tiling fusion path[/-][+][CPU][DT] Failed to compile toy_llama.mlir using data-tiling fusion[/+]hanhanW commentedon Jun 26, 2025
Smaller repro:
hanhanW commentedon Jun 27, 2025
llvm/llvm-project#145995 fixes the expand_shape issue, I'll try to prefetch if there are other new issues or not.
hanhanW commentedon Jun 27, 2025
Here are all the dispatches: https://gist.github.com/hanhanW/f1fa1d98d5b6827460a8d5907ae33d0c
Some of them are not compilable, e.g.,
configured_module_prefill_bs1$async_dispatch_17.mlir. For this case, it may be related to #20786, where the generic op consumer is not fused. So it creates a large temp buffer to hold the data and pass it to the generic op.To repro:
iree-compile --compile-from=executable-sources --compile-to=executable-targets configured_module_prefill_bs1$async_dispatch_17.mlir.mlir[CPU] Disable lowering_config propagation for Mmt4dTilingExpert pipeline
[CPU] Disable lowering_config propagation for Mmt4dTilingExpert pipeline
[CPU] Disable lowering_config propagation for Mmt4dTilingExpert pipel…
hanhanW commentedon Jul 9, 2025
Confirmed that it is fixed by #21275 + #21298
[CPU] Disable lowering_config propagation for Mmt4dTilingExpert pipel…