Closed dan-garvey closed 6 months ago
I can take a look. globals should be in proper order, though, as initialization is performed as they are declared in the top-level module - probably not the issue here, but you should ensure the globals are inserted at the top of the module or before first-use.
probably unrelated but this is with your remove-jit-attr branch
@benvanik ok after moving the global to the top it compiles.
nice - I'll add a pass that runs and verifies globals are in the correct order (declared before use) converttostream requires that globals be converted prior to their uses, so I suspect that's what the issue is here
@stellaraccident this is happening after using externalize_module_parameters(nn.module)
from https://github.com/iree-org/iree-turbine/blob/main/shark_turbine/aot/support/ir_utils.py#L173 I thought we insert global at the start of the moduleOp, am I misunderstanding something?
What happened?
Failure converting to stream with no error:
Steps to reproduce your issue
torch dialect minimal reproducer: (note that removing %12 and returning %11 avoids the error)
compile command: iree-compile repro2.mlir --iree-input-type=torch --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=llvm-cpu --iree-llvmcpu-embedded-linker-path=iree-lld --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false --iree-llvmcpu-target-triple=x86_64-linux-gnu --iree-llvmcpu-target-cpu-features=host --iree-llvmcpu-fail-on-out-of-bounds-stack-allocation=false
ir before ConvertToStream:
What component(s) does this issue relate to?
No response
Version information
No response
Additional context
No response