-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDXL punet_quant.mlir fails to compile at ConvertConvToChannelsLastPass #17643
Comments
cc @hanhanW |
It looks like there is a bug in |
After commenting out the propagation layout from |
It would be good if you can share the IR before the pass, then @IanWood1 can start from there. |
The command would be something like |
@aviator19941 did you get an error before disabling layout propagation for packs/unpack (other than output from --mlir-print-ir-after-failure)? Without propagation disabled, it appears like |
let me check if I can reproduce this with the ToM iree and I'll also get you the IR before the pass. |
This is the IR I got before disabling layout propagation on the IREE version specified above (b44581a): https://gist.github.com/aviator19941/f76d3e86754517578807a710ed9d1195. |
…Last.cpp (#17668) - Added `GreedyRewriteConfig` set to `kNoLimit` since the patterns were failing to converge within the 10 iterations - Changed the way re-association indices are calculated for `GeneralizeOuterUnitDimsPackOps`. (There might be a helper function somewhere for this but i couldn't find one) #### Before (verification error) ```mlir %30042 = "tensor.expand_shape"(%30041) <{reassociation = [[0, 1], [2, 3], [4], [5]], static_output_shape = array<i64: 1, 1, 3, 3, 320, 4>}> : (tensor<3x3x320x4xi8>) -> tensor<1x1x3x3x320x4xi8> ``` #### After ```mlir %30042 = "tensor.expand_shape"(%30041) <{reassociation = [[0, 1, 2], [3], [4], [5]], static_output_shape = array<i64: 1, 1, 3, 3, 320, 4>}> : (tensor<3x3x320x4xi8>) -> tensor<1x1x3x3x320x4xi8> ``` #17643 --------- Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
…Last.cpp (iree-org#17668) - Added `GreedyRewriteConfig` set to `kNoLimit` since the patterns were failing to converge within the 10 iterations - Changed the way re-association indices are calculated for `GeneralizeOuterUnitDimsPackOps`. (There might be a helper function somewhere for this but i couldn't find one) #### Before (verification error) ```mlir %30042 = "tensor.expand_shape"(%30041) <{reassociation = [[0, 1], [2, 3], [4], [5]], static_output_shape = array<i64: 1, 1, 3, 3, 320, 4>}> : (tensor<3x3x320x4xi8>) -> tensor<1x1x3x3x320x4xi8> ``` #### After ```mlir %30042 = "tensor.expand_shape"(%30041) <{reassociation = [[0, 1, 2], [3], [4], [5]], static_output_shape = array<i64: 1, 1, 3, 3, 320, 4>}> : (tensor<3x3x320x4xi8>) -> tensor<1x1x3x3x320x4xi8> ``` iree-org#17643 --------- Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu> Signed-off-by: Lubo Litchev <lubol@google.com>
What happened?
Running --mlir-print-ir-after-all, ConvertConvToChannelsLastPass failed:
// -----// IR Dump After ConvertConvToChannelsLastPass Failed (iree-preprocessing-convert-conv-to-channels-last) //----- //
After turning off the layout propagation for packs/unpacks, I got this error (full error in the attached file):
Steps to reproduce your issue
../iree-build-trace/tools/iree-compile punet_quant.mlir --iree-global-opt-propagate-transposes=true --iree-opt-const-eval=false --iree-opt-outer-dim-concat=true --iree-vm-target-truncate-unsupported-floats --iree-llvmgpu-enable-prefetch=true --iree-opt-data-tiling=false --iree-codegen-gpu-native-math-precision=true --iree-rocm-waves-per-eu=2 --iree-flow-inline-constants-max-byte-length=1 --iree-preprocessing-pass-pipeline="builtin.module(iree-preprocessing-transpose-convolution-pipeline, util.func(iree-preprocessing-pad-to-intrinsics))" --iree-flow-enable-aggressive-fusion --iree-global-opt-enable-fuse-horizontal-contractions=true --iree-opt-aggressively-propagate-transposes=true --iree-codegen-llvmgpu-use-vector-distribution=true --iree-hal-target-backends=rocm --iree-rocm-target-chip=gfx942 --iree-vm-bytecode-module-output-format=flatbuffer-binary -o punet.vmfb
What component(s) does this issue relate to?
Compiler
Version information
b44581a
Additional context
No response
The text was updated successfully, but these errors were encountered: