Hello everyone,
I was experimenting with TVM and wanted to use the Debug
mode build to see if it would make understanding the C++ back-end easier.
The problem is that after building TVM using the cmake debug flag echo "set(CMAKE_BUILD_TYPE Debug)" >> config.cmake
the test.py script that I made to test some functionalities stopped working.
Here is the snipet of the code where the error occurs:
@tvm.script.ir_module
class Module:
@R.function
def main(
A: R.Tensor((2048, 2688), "float32"),
B: R.Tensor((2688, 2304), "float32")) -> R.Tensor((2048, 2304), "float32"):
with R.dataflow():
matmul: R.Tensor((2048,2304),dtype="float32") = R.matmul(A, B, out_dtype="void")
R.output(matmul)
return matmul
mod = relax.transform.LegalizeOps()(Module)
The error is in the operation mod = relax.transform.LegalizeOps()(Module)
.
Here is the error output:
tvm.error.InternalError: Check failed: (eq(a->condition, b->condition)) is false: When a TE compute node produces multiple outputs, each of which is a reduction, each reduction must be structurally identical, except for the ReduceNode::value_index. However, the predicate T.bool(True) does not match T.bool(True)
The full error message is very long so I didn’t place it here (let me know if I should).
The thing is that this error doesn’t occur when using the RelWithDebInfo
cmake mode, so i thing the problem is with the Debug
mode.
Can someone help me out identifying the issue here?