Open sogartar opened 3 weeks ago
Hey @sogartar I would like to work on this. I did some preliminary analysis for this bug, and here is what I found.
In the following function. The solver returns a globalPVS
which is in a valid state but has a set size of 0 . This makes the function return a SmallVector
of size 0 which later down the pipeline when recursivelyEmitDeviceTree
calls itself by calling remainingDeviceGlobalOps.front()
the ArrayRef results in a assert() saying there are no elements in the array.
Coming to why it works with --iree-hal-target-device=llvm-cpu
:
Please let me know if I missed something or if you have any suggestions on how I could solve it. :)
@mvvsmk I have not explored this. I just opened the issue so the problem does not get lost.
What does it mean if no target device is passed? Probably there is some default. If so when this pass executes someone should have already populated the default wherever it is needed. If there is no default somewhere earlier we should check and return a simpler error message.
There's no default - a device must be specified.
When posting reproducers please post the MLIR files and include the commands in the issue description.
What happened?
The program
Fails to compile with assert failure
Steps to reproduce your issue
Download trace-tensor-assert.zip unzip and run
compile.sh
.What component(s) does this issue relate to?
No response
Version information
bb542eee65fa0a498963df1f2ee2f205a3dd8bd0
Additional context
Adding flag
--iree-hal-target-device=llvm-cpu
does not produce the error.