Closed zzzDavid closed 2 years ago
This happens in separate_host_device
python function. Precisely this line:
When the ret_zero
ConstantOp tries to build.
Reading this createDetached
function here, this issue arises when the operation we try to build already exists in the current context.
This issue is randomly triggered when we create multiple modules in the same context. Since the context is the owner of MLIR types and attributes and keeps track of alive operations, and modules couldn't reference operations in each other, I think it makes sense to let different modules use different contexts.
I tried this and the issue was resolved.
Fixed by this commit in HeteroCL repo: 86f6ff366551314bdf8d1b6ba434f4bd1cf1a197
Description
pytest
randomly aborts runningtests/mlir/test_schedule_streaming.py
python tests/mlir/test_schedule_streaming.py
would fail with assertion error:Relevant Tests
Test cases in
tests/mlir/test_schedule_streaming.py
Especiallytest_move_outputs