Ean Garvey

Results 87 comments of Ean Garvey

noting I've included the `empty-tensor-to-alloc-tensor` pass ad-hoc -- this is my diff to init_mlir_passes.h: ``` diff --git a/compiler/src/iree/compiler/Tools/init_mlir_passes.h b/compiler/src/iree/compiler/Tools/init_mlir_passes.h index 4ebbdafe0..2d1d17897 100644 --- a/compiler/src/iree/compiler/Tools/init_mlir_passes.h +++ b/compiler/src/iree/compiler/Tools/init_mlir_passes.h @@ -19,6 +19,7 @@...

The following command successfully finishes compilation for me with [these commits](https://github.com/openxla/iree/pull/16525/commits) cherrypicked: ``` iree-compile .\minimal_attn.mlir --iree-input-type=auto --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=llvm-cpu --iree-llvmcpu-embedded-linker-path=C:\V\iree\build\compiler\bindings\python\iree\compiler\tools\..\_mlir_libs\iree-lld.exe --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false --mlir-pass-pipeline-crash-reproducer=./shark_tmp/core-reproducer.mlir --iree-input-type=torch --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false --iree-llvmcpu-target-cpu-features=host --iree-llvmcpu-target-triple=x86_64-linux-gnu --iree-llvmcpu-enable-ukernels=all --iree-llvmcpu-distribution-size=32 -o...

ROCM runs into shared memory allocation limit with attention tiled+decomposed: https://github.com/openxla/iree/issues/16538

Vulkan is tricky. Stumbling around SPIRV KernelConfig it seems that we just don't have a good pipeline for this decomposition -- I haven't had any luck dropping in `LinalgExt::TileAndDecomposeAttentionPass` anywhere...

Ran into the same issue with the following two CLI inputs: with SRT, all flags normally used for this config in SHARK: ``` iree-compile.exe C:\V\SHARK\apps\shark_studio\web\shark_tmp\vae_decode.torch.tempfile --iree-input-type=torch --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=vulkan --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false...

I managed to prevent the failure on `torch.aten.convolution` by cleaning up some preprocessing flags: ``` --iree-preprocessing-pass-pipeline='builtin.module(func.func(iree-global-opt-detach-elementwise-from-named-ops,iree-preprocessing-convert-conv2d-to-img2col,iree-global-opt-convert-1x1-filter-conv2d-to-matmul,iree-preprocessing-pad-linalg-ops{pad-size=32},iree-linalg-ext-convert-conv2d-to-winograd))' ``` but I'm still seeing issues with: ``` Diagnostics: :0: error: failed to legalize...

Narrowed down to the attached dispatch, can reproduce with: ``` iree-compile.exe dispatch_189.mlir --iree-input-type=torch --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=vulkan --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false --mlir-pass-pipeline-crash-reproducer=./shark_tmp/core-reproducer.mlir --iree-llvmcpu-target-cpu-features=host --iree-stream-resource-max-allocation-size=3221225472 --iree-vulkan-target-env='#vk.target_env>' --iree-vm-bytecode-module-strip-source-map=true --iree-util-zero-fill-elided-attrs --iree-opt-strip-assertions=true --verify=false --iree-opt-const-expr-hoisting=False --iree-codegen-linalg-max-constant-fold-elements=9223372036854775807 --iree-preprocessing-pass-pipeline='builtin.module(func.func(iree-global-opt-detach-elementwise-from-named-ops,iree-preprocessing-convert-conv2d-to-img2col,iree-global-opt-convert-1x1-filter-conv2d-to-matmul,iree-preprocessing-pad-linalg-ops{pad-size=16}))' --iree-vulkan-target-triple=rdna3-7900-windows-msvc ```...

Update: Been playing around with this for a bit. I think I was fumbling into other issues above. This is a more simple approach with less CLI stuff happening: To...

[AMD Official Use Only - General] Hi there, thanks for posting! You might have a Vulkan driver that isn’t compatible with the instructions compiled through the exe. Can you check...

Thanks for offering some ideas. I've merged 1b11c82c9d98e10172a7fbd988cef157493768e9 which accomplishes the first two points. As for the third, a docu-chat/"save conversation" option would probably be the best -- if we...