Skip to content

[TOPI] Error while doing softmax on concatenated array #1024

Description

@PariksheetPinjari909
Traceback (most recent call last):
File "topi/tests/python_cpp/test_topi_region.py", line 50, in <module>
test_region()
File "topi/tests/python_cpp/test_topi_region.py", line 47, in test_region
verify_region(1, 2, 8, 2, 2, 1, 1, 1)
File "topi/tests/python_cpp/test_topi_region.py", line 43, in verify_region
check_device(device)
File "topi/tests/python_cpp/test_topi_region.py", line 38, in check_device
func = tvm.build(s, [A, B], device)
File "/home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/build_module.py", line 467, in build
mhost = codegen.build_module(fhost, str(target_host))
File "/home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/codegen.py", line 20, in build_module
return _Build(lowered_func, target)
File "/home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/_ffi/function.py", line 280, in my_api_func
return flocal(*args)
File "tvm/_ffi/_cython/./function.pxi", line 264, in core.FunctionBase.__call__
File "tvm/_ffi/_cython/./function.pxi", line 213, in core.FuncCall
File "tvm/_ffi/_cython/./function.pxi", line 205, in core.FuncCall3
File "tvm/_ffi/_cython/./base.pxi", line 131, in core.CALL
tvm._ffi.base.TVMError: b'[17:39:01] src/codegen/llvm/codegen_llvm.cc:632: unknown intrinsic indeterminate_expression\n\nStack trace returned 10 entries:\n[bt] (0) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(dmlc::StackTrace[abi:cxx11]()+0x53) [0x7f74bd130003]\n[bt] (1) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x39) [0x7f74bd130879]\n[bt] (2) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::codegen::CodeGenLLVM::CreateIntrinsic(HalideIR::Internal::Call const*)+0x8b) [0x7f74bd3ada8b]\n[bt] (3) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::codegen::CodeGenCPU::CreateIntrinsic(HalideIR::Internal::Call const*)+0x40) [0x7f74bd3ba110]\n[bt] (4) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::codegen::CodeGenLLVM::VisitExpr_(HalideIR::Internal::Call const*)+0x61) [0x7f74bd3a51f1]\n[bt] (5) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::IRFunctor<llvm::Value* (tvm::NodeRef const&, tvm::ir::ExprFunctor<llvm::Value* (HalideIR::Expr const&)>*)>::operator()(tvm::NodeRef const&, tvm::ir::ExprFunctor<llvm::Value* (HalideIR::Expr const&)>*) const+0x7d) [0x7f74bd38e61d]\n[bt] (6) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::codegen::CodeGenLLVM::VisitExpr_(HalideIR::Internal::Load const*)+0x75) [0x7f74bd3a8f75]\n[bt] (7) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::IRFunctor<llvm::Value* (tvm::NodeRef const&, tvm::ir::ExprFunctor<llvm::Value* (HalideIR::Expr const&)>*)>::operator()(tvm::NodeRef const&, tvm::ir::ExprFunctor<llvm::Value* (HalideIR::Expr const&)>*) const+0x7d) [0x7f74bd38e61d]\n[bt] (8) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::codegen::CodeGenLLVM::VisitStmt_(HalideIR::Internal::Store const*)+0x108) [0x7f74bd3a9698]\n[bt] (9) /home/pariksheet/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(tvm::IRFunctor<void (tvm::NodeRef const&, tvm::ir::StmtFunctor<void (HalideIR::Internal::Stmt const&)>*)>::operator()(tvm::NodeRef const&, tvm::ir::StmtFunctor<void (HalideIR::Internal::Stmt const&)>*) const+0x11d) [0x7f74bd30443d]\n\n'

This the error i am getting while softmax an tensor array which is been concatenated. Can anyone help?

Code snippet:

 auto x = concatenate(softmax_input, 2);
Tensor softmax_output = softmax(x, 2);

Shape of the axis along which the array is concatenated is an expression. If i manually change the shape to an integer value, then it is working fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions