You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I get this error during compilation with kind="vm", but it works correctly for kind="debug":
Traceback (most recent call last):
File "tst.py", line 42, in <module>
vm = relay.create_executor(mod=mod, ctx=ctx, target='llvm', kind="vm")
File "/home/anakha/ext/tvm/python/tvm/relay/build_module.py", line 411, in create_executor
return VMExecutor(mod, ctx, target)
File "/home/anakha/ext/tvm/python/tvm/relay/backend/vm.py", line 540, in __init__
self.executable = compile(mod, target)
File "/home/anakha/ext/tvm/python/tvm/relay/backend/vm.py", line 399, in compile
compiler.lower(mod, target, target_host)
File "/home/anakha/ext/tvm/python/tvm/relay/backend/vm.py", line 455, in lower
self._lower(mod, target, target_host)
File "tvm/_ffi/_cython/./function.pxi", line 304, in tvm._ffi._cy3.core.FunctionBase.__call__
File "tvm/_ffi/_cython/./function.pxi", line 239, in tvm._ffi._cy3.core.FuncCall
File "tvm/_ffi/_cython/./function.pxi", line 228, in tvm._ffi._cy3.core.FuncCall3
File "tvm/_ffi/_cython/./base.pxi", line 157, in tvm._ffi._cy3.core.CALL
tvm._ffi.base.TVMError: Traceback (most recent call last):
[bt] (8) /home/anakha/ext/tvm/build/libtvm.so(+0x2097b7d) [0x7f0bebd40b7d]
[bt] (7) /home/anakha/ext/tvm/build/libtvm.so(+0x2097d9c) [0x7f0bebd40d9c]
[bt] (6) /home/anakha/ext/tvm/build/libtvm.so(+0x2097f08) [0x7f0bebd40f08]
[bt] (5) /home/anakha/ext/tvm/build/libtvm.so(+0x2097579) [0x7f0bebd40579]
[bt] (4) /home/anakha/ext/tvm/build/libtvm.so(tvm::relay::vm::PrimitiveInliner::Inline()+0x276) [0x7f0bebd41a1c]
[bt] (3) /home/anakha/ext/tvm/build/libtvm.so(tvm::IRModuleNode::Add(tvm::GlobalVar const&, tvm::BaseFunc const&, bool)+0xcb) [0x7f0beb3daca3]
[bt] (2) /home/anakha/ext/tvm/build/libtvm.so(tvm::RunTypeCheck(tvm::IRModule const&, tvm::GlobalVar const&, tvm::relay::Function)+0x5b) [0x7f0beb3da662]
[bt] (1) /home/anakha/ext/tvm/build/libtvm.so(tvm::relay::DeDup(tvm::RelayExpr const&)+0x106) [0x7f0bebb460cd]
[bt] (0) /home/anakha/ext/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4a) [0x7f0beb36f884]
File "/home/anakha/ext/tvm/src/relay/pass/de_duplicate.cc", line 109
TVMError: Check failed: WellFormed(e): v0.0.4
fn (%p: u[]) -> int32 {
%0 = match (%p) {
c0(_) => True /* ty=bool */,
_ => False /* ty=bool */,
};
if (%0) {
0 /* ty=int32 */
} else {
%1 = match? (%p) {
c0(%v: (int32, u[])) => %v,
};
%2 = %1.0;
%3 = match? (%p) {
c0(%v: (int32, u[])) => %v,
};
%4 = %3.1;
%5 = @fn(%4);
add(%2, %5)
}
}
The only thing I can notice is that something duplicated the match in the else branch and this probably makes the code not well formed. I traced the WellFormed Error and it comes from %v. I may be wrong about this.
The text was updated successfully, but these errors were encountered:
I'll keep working on that for a bit trying to find an acceptable solution, but I will gladly take any help/hints that I can get.
abergeron
changed the title
[relay] ADT match becomes not well formed during VM optimization
[relay] PrimitiveInliner doesn't correctly handle match expression that have more than one reference
Jan 27, 2020
abergeron
changed the title
[relay] PrimitiveInliner doesn't correctly handle match expression that have more than one reference
[relay] PrimitiveInliner doesn't correctly handle match expressions that have more than one reference
Jan 27, 2020
abergeron
changed the title
[relay] PrimitiveInliner doesn't correctly handle match expressions that have more than one reference
[relay] PrimitiveInliner doesn't correctly handle match expressions that have more than one use
Jan 27, 2020
I have this sample program:
The module looks like this before compiling:
And I get this error during compilation with kind="vm", but it works correctly for kind="debug":
The only thing I can notice is that something duplicated the match in the else branch and this probably makes the code not well formed. I traced the WellFormed Error and it comes from %v. I may be wrong about this.
The text was updated successfully, but these errors were encountered: