Cookiee235 opened a new issue, #17952:
URL: https://github.com/apache/tvm/issues/17952

   ### Actual behavior
   
   ```
   Traceback (most recent call last):
     File "/data/qshenaf/remote_pc/TirFuzz/bugs/05-11_03-53/topi.rsqrt_4.py", 
line 9, in <module>
       tvm.build(sch.mod, target='llvm')
     File "/data/qshenaf/envs/tvm/python/tvm/driver/build_module.py", line 59, 
in build
       return tvm.tir.build(mod, target, pipeline)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/python/tvm/tir/build.py", line 186, in build
       return tir_to_runtime(host_mod, device_mod_dict, target_host)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/python/tvm/tir/build.py", line 98, in 
tir_to_runtime
       mhost = codegen_build(mhost_all, target_host)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/python/tvm/tir/build.py", line 80, in 
codegen_build
       return bf(mod, target)
              ^^^^^^^^^^^^^^^
     File "tvm/_ffi/_cython/./packed_func.pxi", line 339, in 
tvm._ffi._cy3.core.PackedFuncBase.__call__
     File "tvm/_ffi/_cython/./packed_func.pxi", line 270, in 
tvm._ffi._cy3.core.FuncCall
     File "tvm/_ffi/_cython/./packed_func.pxi", line 259, in 
tvm._ffi._cy3.core.FuncCall3
     File "tvm/_ffi/_cython/./base.pxi", line 185, in 
tvm._ffi._cy3.core.CHECK_CALL
     File "/data/qshenaf/envs/tvm/python/tvm/_ffi/base.py", line 468, in 
raise_last_ffi_error
       raise py_err
     File "/data/qshenaf/envs/tvm/src/target/llvm/llvm_module.cc", line 620, in 
operator()
       n->Init(mod, target);
                   ^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/llvm_module.cc", line 354, in 
tvm::codegen::LLVMModuleNode::Init(tvm::IRModule const&, tvm::Target const&)
       cg->AddFunctionsOrdered(mod->functions.begin(), mod->functions.end());
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h", line 180, in 
void 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator)
       this->AddFunctionsOrdered(begin, end, [](auto f) { return f; });
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h", line 644, in 
void 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator, 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, 
void>::iterator)::{lambda(auto:1)#1}>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator)::{lambda(auto:1)#1})
       AddFunction(gvar, func);
                     ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 232, in 
tvm::codegen::CodeGenCPU::AddFunction(tvm::GlobalVar const&, tvm::tir::PrimFunc 
const&)
       CodeGenLLVM::AddFunction(gvar, func);
                       ^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 223, 
in tvm::codegen::CodeGenLLVM::AddFunction(tvm::GlobalVar const&, 
tvm::tir::PrimFunc const&)
       this->AddFunctionInternal(gvar, f);
                       ^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 312, 
in tvm::codegen::CodeGenLLVM::AddFunctionInternal(tvm::GlobalVar const&, 
tvm::tir::PrimFunc const&)
       this->VisitStmt(f->body);
                       ^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2174, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
       VisitStmt(op->body);
                       ^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2174, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
       VisitStmt(op->body);
                       ^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2174, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
       VisitStmt(op->body);
                       ^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1131, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AttrStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                     ^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2118, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AttrStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2174, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
       VisitStmt(op->body);
                       ^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2174, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
       VisitStmt(op->body);
                       ^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2162, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1131, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AttrStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                     ^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2118, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AttrStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2168, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::SeqStmtNode const*)
       this->VisitStmt(stmt);
                     ^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2168, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::SeqStmtNode const*)
       this->VisitStmt(stmt);
                     ^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1089, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
       CodeGenLLVM::VisitStmt_(op);
                       ^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2125, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2174, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
       VisitStmt(op->body);
                       ^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2174, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
       VisitStmt(op->body);
                       ^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 2168, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::SeqStmtNode const*)
       this->VisitStmt(stmt);
                     ^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1099, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AttrStmtNode const*)
       this->CreateComputeScope(op);
                     ^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 578, in 
tvm::codegen::CodeGenCPU::CreateComputeScope(tvm::tir::AttrStmtNode const*)
       this->VisitStmt(op->body);
                       ^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1139, 
in tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::ForNode const*)
       CodeGenLLVM::VisitStmt_(op);
                     ^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 1989, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::ForNode const*)
       CreateSerialFor(MakeValue(op->min), MakeValue(op->extent),
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 873, 
in tvm::codegen::CodeGenLLVM::CreateSerialFor(llvm::Value*, llvm::Value*, 
llvm::Value*, tvm::tir::Var const&, tvm::tir::Stmt const&)
       this->VisitStmt(body);
                       ^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 1942, 
in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::BufferStoreNode const*)
       llvm::Value* value = MakeValue(op->value);
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h", line 192, in 
tvm::codegen::CodeGenLLVM::MakeValue(tvm::PrimExpr const&)
       llvm::Value* MakeValue(const PrimExpr& e) { return VisitExpr(e); }
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 1595, 
in tvm::codegen::CodeGenLLVM::VisitExpr_(tvm::tir::DivNode const*)
       llvm::Value* b = MakeValue(op->b);
                       ^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h", line 192, in 
tvm::codegen::CodeGenLLVM::MakeValue(tvm::PrimExpr const&)
       llvm::Value* MakeValue(const PrimExpr& e) { return VisitExpr(e); }
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 1857, 
in tvm::codegen::CodeGenLLVM::VisitExpr_(tvm::tir::CallNodeconst*)
       auto x = CreateIntrinsic(op);
                   ^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc", line 1059, 
in tvm::codegen::CodeGenCPU::CreateIntrinsic(tvm::tir::CallNode const*)
       return CodeGenLLVM::CreateIntrinsic(op);
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 1361, 
in tvm::codegen::CodeGenLLVM::CreateIntrinsic(tvm::tir::CallNode const*)
       ICHECK(f) << "Cannot find intrinsic declaration, possible type mismatch: 
"
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   tvm.error.InternalError: Traceback (most recent call last):
     83: operator()
           at /data/qshenaf/envs/tvm/src/target/llvm/llvm_module.cc:620
     82: tvm::codegen::LLVMModuleNode::Init(tvm::IRModule const&, tvm::Target 
const&)
           at /data/qshenaf/envs/tvm/src/target/llvm/llvm_module.cc:354
     81: void 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h:180
     80: void 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator, 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, 
void>::iterator)::{lambda(auto:1)#1}>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, 
tvm::codegen::CodeGenLLVM::AddFunctionsOrdered<tvm::runtime::Map<tvm::GlobalVar,
 tvm::BaseFunc, void, void>::iterator>(tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator, tvm::runtime::Map<tvm::GlobalVar, 
tvm::BaseFunc, void, void>::iterator)::{lambda(auto:1)#1})
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h:644
     79: tvm::codegen::CodeGenCPU::AddFunction(tvm::GlobalVar const&, 
tvm::tir::PrimFunc const&)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:232
     78: tvm::codegen::CodeGenLLVM::AddFunction(tvm::GlobalVar const&, 
tvm::tir::PrimFunc const&)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:223
     77: tvm::codegen::CodeGenLLVM::AddFunctionInternal(tvm::GlobalVar const&, 
tvm::tir::PrimFunc const&)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:312
     76: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     75: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     74: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     73: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     72: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     71: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     70: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2174
     69: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     68: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     67: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     66: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     65: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     64: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     63: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     62: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     61: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     60: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     59: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     58: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     57: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     56: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2174
     55: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     54: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2174
     53: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     52: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     51: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AttrStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1131
     50: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AttrStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2118
     49: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     48: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     47: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     46: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     45: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     44: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2174
     43: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     42: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2174
     41: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2162
     40: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AttrStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1131
     39: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AttrStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2118
     38: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     37: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     36: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     35: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     34: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::SeqStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2168
     33: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     32: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     31: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     30: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     29: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     28: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     27: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     26: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     25: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     24: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     23: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::SeqStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2168
     22: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     21: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     20: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     19: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     18: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     17: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     16: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1089
     15: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::AssertStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2125
     14: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2174
     13: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::DeclBufferNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2174
     12: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::SeqStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:2168
     11: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::AttrStmtNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1099
     10: tvm::codegen::CodeGenCPU::CreateComputeScope(tvm::tir::AttrStmtNode 
const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:578
     9: tvm::codegen::CodeGenCPU::VisitStmt_(tvm::tir::ForNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1139
     8: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::ForNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:1989
     7: tvm::codegen::CodeGenLLVM::CreateSerialFor(llvm::Value*, llvm::Value*, 
llvm::Value*, tvm::tir::Var const&, tvm::tir::Stmt const&)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:873
     6: tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::BufferStoreNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:1942
     5: tvm::codegen::CodeGenLLVM::MakeValue(tvm::PrimExpr const&)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h:192
     4: tvm::codegen::CodeGenLLVM::VisitExpr_(tvm::tir::DivNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:1595
     3: tvm::codegen::CodeGenLLVM::MakeValue(tvm::PrimExpr const&)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.h:192
     2: tvm::codegen::CodeGenLLVM::VisitExpr_(tvm::tir::CallNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:1857
     1: tvm::codegen::CodeGenCPU::CreateIntrinsic(tvm::tir::CallNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_cpu.cc:1059
     0: tvm::codegen::CodeGenLLVM::CreateIntrinsic(tvm::tir::CallNode const*)
           at /data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc:1361
     File "/data/qshenaf/envs/tvm/src/target/llvm/codegen_llvm.cc", line 1361
   InternalError: Check failed: (f) is false: Cannot find intrinsic 
declaration, possible type mismatch: llvm.sqrt
   ```
   
   ### Environment
   
   tvm-0.21.dev0
   
   ### Steps to reproduce
   
   ```
   import tvm
   from tvm import te, topi, tir
   
   x = te.placeholder((1024,), dtype='int16', name='x')
   op_output = topi.rsqrt(x)
   sch = tir.Schedule(te.create_prim_func([x, op_output]))
   tvm.build(sch.mod, target='llvm')
   ```
   
   ### Triage
   
   * needs-triage
   * topi
   
   
   cc @jikechao 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to