iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.58k stars 577 forks source link

iree-codegen-cpu-materialize-host-encoding fails with invalid reference to GlobalOp #18628

Open sogartar opened 11 hours ago

sogartar commented 11 hours ago

What happened?

I have input MLIR that is exported from the test in this PR. It's compilation with assertions on fails with

iree-compile: repo/compiler/src/iree/compiler/Dialect/HAL/Analysis/DeviceAnalysis.cpp:180: auto mlir::iree_compiler::IREE::HAL::DeviceAnalysis::gatherDeviceTargets(mlir::Attribute, mlir::Operation *, SetVector<IREE::HAL::DeviceTargetAttr> &)::(anonymous class)::operator()(auto) const [symRefAttr:auto = mlir::SymbolRefAttr]: Assertion `globalOp && "global reference must be valid"' failed.

Steps to reproduce your issue

  1. Download the reproducer sharded-toy-llama.zip.
  2. Run compile.sh.

What component(s) does this issue relate to?

Compiler

Version information

5a2dd5609d41df71e7ad77fb706e1cb971492f7b

Additional context

No response

benvanik commented 11 hours ago

that pass is fundamentally incompatible with multi-device - you need to disable data tiling

sogartar commented 11 hours ago

@benvanik How do you disable data tiling? I tried with

--iree-opt-data-tiling=false
--iree-llvmcpu-disable-arm-sme-tiling

But I get the same error.

sogartar commented 11 hours ago

@hanhanW do you know how to disable it?

hanhanW commented 11 hours ago

Adding --iree-opt-data-tiling=false should disable the data-tiling. I can't tell much without looking at logs.