Continuing the discussion from Crash triggered by 5 lines of TIR code:
I encountered another crash related to Load
node. Code is shown below:
from tvm import tir
import tvm
if __name__ == '__main__':
zero = tir.const(0)
nop = tir.Evaluate(zero)
v = tir.Var('i1', 'int32')
for_stmt = tir.For(v, zero, zero, tir.ForKind.SERIAL, nop)
load = tir.Evaluate(tir.Load('int32', v, zero))
seq = tir.SeqStmt([for_stmt, for_stmt, load])
func = tir.PrimFunc([], seq)
tvm.build(func)
which produces a segmentation fault:
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fffdd10d7fb in tvm::tir::IRConvertSSA::VisitExpr_(tvm::tir::LoadNode const*) ()
I know I may misuse some APIs but I’m just curious why it leads to a crash of the whole program. I’d appreciate any help .