@comaniac I got the following interesting error when tuning on a task with ID 48. The tuning script was aborted, so this is not a invalid code problem but the problem of auto scheduler itself.
Estimated total latency: - ms Trials: 3058 Used time : 5765 s Next ID: 48
----------------------------------------------------------------------
------------------------------ [ Search ]
----------------------------------------------------------------------
Generate Sketches #s: 1
Traceback (most recent call last):
File "maskrcnn_test.py", line 155, in <module>
auto_schedule()
File "maskrcnn_test.py", line 118, in auto_schedule
tuner.tune(tune_option)
File "/home/masa/projects/dev/tvm/python/tvm/auto_scheduler/task_scheduler.py", line 324, in tune
self._tune_task(idx)
File "/home/masa/projects/dev/tvm/python/tvm/auto_scheduler/task_scheduler.py", line 420, in _tune_task
self.num_measures_per_round, self.measurer
File "/home/masa/projects/dev/tvm/python/tvm/auto_scheduler/search_policy.py", line 86, in continue_search_one_round
return _ffi_api.SearchPolicyContinueSearchOneRound(self, num_measure, measurer)
File "/home/masa/projects/dev/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
...
...
[bt] (2) /home/masa/projects/dev/tvm/build/libtvm.so(tvm::auto_scheduler::InitThreadBind::Apply(tvm::auto_scheduler::SketchPolicyNode*, tvm::auto_scheduler::State*, std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul>*) const+0x5a5) [0x7f2f95c1c205]
[bt] (1) /home/masa/projects/dev/tvm/build/libtvm.so(tvm::auto_scheduler::FuseAllOuterSpaceIterators(tvm::auto_scheduler::State const&, int, tvm::auto_scheduler::Iterator*)+0x3a9) [0x7f2f95c24129]
[bt] (0) /home/masa/projects/dev/tvm/build/libtvm.so(+0x7b8f28) [0x7f2f95c0ff28]
File "/home/masa/projects/dev/tvm/src/support/parallel_for.cc", line 92
TVMError: Parallel_for error with [08:39:59] /home/masa/projects/dev/tvm/src/auto_scheduler/search_policy/utils.h:612:
---------------------------------------------------------------
An internal invariant was violated during the execution of TVM.
Please read TVM's error reporting guidelines.
More details can be found here: https://discuss.tvm.ai/t/error-reporting/7793.
---------------------------------------------------------------
Check failed: !to_fuse.empty() == false:
The task 48 is this one:
========== Task 48 (workload key: ["d19859b192abcefb252f6ea36ca4b5c5"]) ==========
placeholder = PLACEHOLDER [1, 256, 13, 13]
pad_temp(i0, i1, i2, i3) = tir.if_then_else(((((i2 >= 1) && (i2 < 14)) && (i3 >= 1)) && (i3 < 14)), placeholder[i0, i1, (i2 - 1), (i3 - 1)], 0f)
placeholder = PLACEHOLDER [256, 256, 3, 3]
compute(nn, ff, yy, xx) += (pad_temp[nn, rc, (yy + ry), (xx + rx)]*placeholder[ff, rc, ry, rx])
placeholder = PLACEHOLDER [1, 256, 1, 1]
T_add(ax0, ax1, ax2, ax3) = (compute[ax0, ax1, ax2, ax3] + placeholder[ax0, ax1, 0, 0])
T_relu(ax0, ax1, ax2, ax3) = max(T_add[ax0, ax1, ax2, ax3], 0f)
Interestingly, this is the same task that gave Unsupported reduction operator(x*y)
error earlier. Could this be related?