apache / tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
https://tvm.apache.org/
Apache License 2.0
11.44k stars 3.41k forks source link

tvm nnpack #13915

Open wm901115nwpu opened 1 year ago

wm901115nwpu commented 1 year ago

╰─ make cpptest ─╯ [ 2%] Built target project_libbacktrace [ 85%] Built target tvm_objs [ 93%] Built target tvm_runtime_objs [ 93%] Built target tvm_libinfo_objs [ 93%] Built target tvm [ 94%] Building CXX object CMakeFiles/cpptest.dir/tests/cpp/data_type_rewriter_test.cc.o /Users/unicorn/workspace/tvm/tests/cpp/data_type_rewriter_test.cc:35:18: error: use of class template 'DataTypeLegalizerBinaryOp' requires template arguments; argument deduction not allowed in function prototype TYPED_TEST_SUITE(DataTypeLegalizerBinaryOp, BinaryOpTypes); ^~~~~~~~~ /Users/unicorn/workspace/tvm/tests/cpp/data_type_rewriter_test.cc:33:7: note: template is declared here class DataTypeLegalizerBinaryOp : public ::testing::Test {}; ^ /Users/unicorn/workspace/tvm/tests/cpp/data_type_rewriter_test.cc:35:1: error: C++ requires a type specifier for all declarations TYPED_TEST_SUITE(DataTypeLegalizerBinaryOp, BinaryOpTypes); ^ /Users/unicorn/workspace/tvm/tests/cpp/data_type_rewriter_test.cc:37:1: error: use of undeclared identifier 'gtest_type_paramsDataTypeLegalizerBinaryOp' TYPED_TEST(DataTypeLegalizerBinaryOp, Basic) { ^ /Users/unicorn/workspace/tvm/NNPACK/build/install/include/gtest/gtest-typed-test.h:183:11: note: expanded from macro 'TYPED_TEST' GTEST_TYPEPARAMS(CaseName)>::Register(\ ^ /Users/unicorn/workspace/tvm/NNPACK/build/install/include/gtest/gtest-typed-test.h:160:43: note: expanded from macro 'GTEST_TYPEPARAMS'

define GTEST_TYPEPARAMS(TestCaseName) gtest_typeparams##TestCaseName##_

                                      ^
:119:1: note: expanded from here gtest_type_params_DataTypeLegalizerBinaryOp_ ^ 3 errors generated. make[3]: *** [CMakeFiles/cpptest.dir/tests/cpp/data_type_rewriter_test.cc.o] Error 1 make[2]: *** [CMakeFiles/cpptest.dir/all] Error 2 make[1]: *** [CMakeFiles/cpptest.dir/rule] Error 2 make: *** [cpptest] Error 2
wm901115nwpu commented 1 year ago

Python 3.9.1 (default, Dec 11 2020, 06:28:49) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.

import tvm Traceback (most recent call last): File "", line 1, in File "/Users/unicorn/workspace/tvm/python/tvm/init.py", line 33, in from .runtime.object import Object File "/Users/unicorn/workspace/tvm/python/tvm/runtime/init.py", line 23, in from .script_printer import Scriptable File "/Users/unicorn/workspace/tvm/python/tvm/runtime/script_printer.py", line 28, in class PrinterConfig(Object): File "/Users/unicorn/workspace/tvm/python/tvm/_ffi/registry.py", line 69, in register check_call(_LIB.TVMObjectTypeKey2Index(c_str(object_name), ctypes.byref(tidx))) File "/Users/unicorn/workspace/tvm/python/tvm/_ffi/base.py", line 348, in check_call raise get_last_ffi_error() tvm._ffi.base.TVMError: Traceback (most recent call last): [bt] (5) 6 ??? 0x00007ff7b6ef49f0 0x0 + 140701902785008 [bt] (4) 5 libffi.7.dylib 0x000000010957eead ffi_call_unix64 + 85 [bt] (3) 4 libtvm.dylib 0x0000000122757f24 TVMObjectTypeKey2Index + 132 [bt] (2) 3 libtvm.dylib 0x0000000122757b8d tvm::runtime::TypeContext::TypeKey2Index(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) + 237 [bt] (1) 2 libtvm.dylib 0x00000001209c2559 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89 [bt] (0) 1 libtvm.dylib 0x00000001227402b8 tvm::runtime::Backtrace() + 24 File "/Users/unicorn/workspace/tvm/src/runtime/object.cc", line 165 TVMError:

An error occurred during the execution of TVM. For more information, please see: https://tvm.apache.org/docs/errors.html

Check failed: (it != typekey2index.end()) is false: Cannot find type node.PrinterConfig. Did you forget to register the node by TVM_REGISTER_NODE_TYPE ?