Hi,everyone.Now I run my demo code in cce target,But an error occurred like this:
[ERROR] RUNTIME(4472)kernal task happen error, error code=0x26, [aicore exception].
[ERROR] RUNTIME(4472)aicore kernel execute failed, device_id=0, stream_id=1, task_id=0, fault kernel_name=myfunc_kernel0, func_name=myfunc_kernel0
[ERROR] AKG:2021-05-05-12:21:33.569.843 [cce_module.cc:232] [cce] Check failed: e == RT_ERROR_NONE: Cce runtime error: errno=145, info=Unknow cce error code
Stack trace:
[bt] (0) /home/HwHiAiUser/akg/build/libakg.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x58) [0xfffef59e1cb4]
[bt] (1) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::CceWrappedFunc::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*, void**, long*, unsigned long) const+0x610) [0xfffef6f061f4]
[bt] (2) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::detail::PackFuncVoidAddr_<4, air::runtime::CceWrappedFunc>(air::runtime::CceWrappedFunc, std::vector<air::runtime::detail::ArgConvertCode, std::allocator<air::runtime::detail::ArgConvertCode> > const&, int)::{lambda(air::runtime::TVMArgs, air::runtime::TVMRetValue*)#1}::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x2d0) [0xfffef6f0885c]
[bt] (3) /home/HwHiAiUser/akg/build/libakg.so(std::_Function_handler<void (air::runtime::TVMArgs, air::runtime::TVMRetValue*), air::runtime::detail::PackFuncVoidAddr_<4, air::runtime::CceWrappedFunc>(air::runtime::CceWrappedFunc, std::vector<air::runtime::detail::ArgConvertCode, std::allocator<air::runtime::detail::ArgConvertCode> > const&, int)::{lambda(air::runtime::TVMArgs, air::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, air::runtime::TVMArgs&&, air::runtime::TVMRetValue*&&)+0x7c) [0xfffef6f0d8bc]
[bt] (4) /home/HwHiAiUser/akg/build/libakg.so(std::function<void (air::runtime::TVMArgs, air::runtime::TVMRetValue*)>::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x78) [0xfffef5a2e6b8]
[bt] (5) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::PackedFunc::CallPacked(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x5c) [0xfffef5af9200]
[bt] (6) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::StackVM::Run(air::runtime::StackVM::State*) const+0x14d0) [0xfffef7727b30]
[bt] (7) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::StackVM::Run(air::runtime::TVMArgs const&, air::runtime::ModuleNode*) const+0x108) [0xfffef7726168]
[bt] (8) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::StackVMModuleNode::GetFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, air::runtime::ObjectPtr<air::runtime::Object> const&)::{lambda(air::runtime::TVMArgs, air::runtime::TVMRetValue*)#1}::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x48) [0xfffef772c1b4]
Traceback (most recent call last):
File "vector_add.py", line 30, in <module>
mod(a, b, c)
File "/home/HwHiAiUser/akg/third_party/incubator-tvm/python/tvm/_ffi/function.py", line 144, in __call__
return f(*args)
File "/home/HwHiAiUser/akg/third_party/incubator-tvm/python/tvm/_ffi/_ctypes/function.py", line 207, in __call__
raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
[bt] (8) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::StackVMModuleNode::GetFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, air::runtime::ObjectPtr<air::runtime::Object> const&)::{lambda(air::runtime::TVMArgs, air::runtime::TVMRetValue*)#1}::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x48) [0xfffef772c1b4]
[bt] (7) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::StackVM::Run(air::runtime::TVMArgs const&, air::runtime::ModuleNode*) const+0x108) [0xfffef7726168]
[bt] (6) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::StackVM::Run(air::runtime::StackVM::State*) const+0x14d0) [0xfffef7727b30]
[bt] (5) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::PackedFunc::CallPacked(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x5c) [0xfffef5af9200]
[bt] (4) /home/HwHiAiUser/akg/build/libakg.so(std::function<void (air::runtime::TVMArgs, air::runtime::TVMRetValue*)>::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x78) [0xfffef5a2e6b8]
[bt] (3) /home/HwHiAiUser/akg/build/libakg.so(std::_Function_handler<void (air::runtime::TVMArgs, air::runtime::TVMRetValue*), air::runtime::detail::PackFuncVoidAddr_<4, air::runtime::CceWrappedFunc>(air::runtime::CceWrappedFunc, std::vector<air::runtime::detail::ArgConvertCode, std::allocator<air::runtime::detail::ArgConvertCode> > const&, int)::{lambda(air::runtime::TVMArgs, air::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, air::runtime::TVMArgs&&, air::runtime::TVMRetValue*&&)+0x7c) [0xfffef6f0d8bc]
[bt] (2) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::detail::PackFuncVoidAddr_<4, air::runtime::CceWrappedFunc>(air::runtime::CceWrappedFunc, std::vector<air::runtime::detail::ArgConvertCode, std::allocator<air::runtime::detail::ArgConvertCode> > const&, int)::{lambda(air::runtime::TVMArgs, air::runtime::TVMRetValue*)#1}::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*) const+0x2d0) [0xfffef6f0885c]
[bt] (1) /home/HwHiAiUser/akg/build/libakg.so(air::runtime::CceWrappedFunc::operator()(air::runtime::TVMArgs, air::runtime::TVMRetValue*, void**, long*, unsigned long) const+0x610) [0xfffef6f061f4]
[bt] (0) /home/HwHiAiUser/akg/build/libakg.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x58) [0xfffef59e1cb4]
File "/home/HwHiAiUser/akg/third_party/incubator-tvm/src/runtime/cce/cce_module.cc", line 232
TVMError: Check failed: e == RT_ERROR_NONE: Cce runtime error: errno=145, info=Unknow cce error code
Segmentation fault
import akg
from akg import tvm
import numpy as np
n = 5
a = tvm.placeholder([n], name='a')
b = tvm.placeholder([n], name='b')
c = tvm.compute([n], lambda i: a + b[n - i - 1])
s = tvm.create_schedule(c.op)
mod = akg.build(s, (a, b, c), 'cce', [], name='myfunc', attrs={}, polyhedral=True, binds=None)
print(mod.imported_modules[0].get_source())
a_np = np.random.random([n]).astype(a.dtype)
b_np = np.random.random([n]).astype(b.dtype)
print(a_np, b_np)
ctx = tvm.context('cce')
a = tvm.nd.array(a_np, ctx)
b = tvm.nd.array(b_np, ctx)
c = tvm.nd.array(np.zeros([n], dtype=a_np.dtype), ctx)
mod(a, b, c)
ctx.sync()
print(c)
I'm confusing about that, it's a simple operator,it makes no sense akg cannot run it.
Thanks!
Hi,everyone.Now I run my demo code in cce target,But an error occurred like this:
Here is demo snippet:
I'm confusing about that, it's a simple operator,it makes no sense akg cannot run it.
Thanks!