Dear Developers,
I was looking into the schedule_packed_conv2d function in the vta_conv2d.py
file and was trying to reorder the axis of computation for the VTA hardware. Basically, in order to compute 1 output value in the output of shape (C, H, W), we have 5 loops as follows:
for output_column: // W
for output_row: // H
for output_channel: // C
for weight_x:
for weight_y:
Multiply()
I would like to compute the conv2d operator in the above order, so I tried changing this line:
# output_column output_channel output_row
# | | |
s[conv2d_stage].reorder(x_bo, k_o, x_j, d_j, d_i, x_co, x_i, x_bi, x_ci, k_i)
# | |
# weight_x weight_y
to the following:
# output_column row output_channel
# | | |
s[conv2d_stage].reorder(x_bo, k_o, x_j, x_i, x_co, d_j, d_i, x_bi, x_ci, k_i)
# | |
# weight_x weight_y
Question
However, changing the line above gave me a runtime error at this line. What might be the cause of the error? Is there any restriction in changing the order of computation?
Traceback (most recent call last):
File "~/test_conv2d.py", line 236, in <module>
tcost = timer()
File "~/tvm/python/tvm/module.py", line 178, in evaluator
blob = feval(*args)
File "~/tvm/python/tvm/_ffi/_ctypes/function.py", line 185, in __call__
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File "~/tvm/python/tvm/_ffi/base.py", line 71, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: [17:07:54] ~/tvm/vta/src/runtime.cc:251: Check failed: seq_[i].dst_idx != dst_index