You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/01/12 13:07:28 UTC

[GitHub] [tvm] gaintpd opened a new issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

gaintpd opened a new issue #7261:
URL: https://github.com/apache/tvm/issues/7261


   I can compile the tvm successfully on my ubuntu 20.04 LTS edition, and the hardware is thinkpad P52, When I set the ethos-n option in config.cmake in the build directory, I get the following error:
   ```
   -- Build with RPC support...
   -- Build with Graph runtime support...
   -- Build with Graph runtime debug support...
   -- VTA build with VTA_HW_PATH=/home/dyn/tvm/3rdparty/vta-hw
   -- Build VTA runtime with target: sim
   -- Found CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
   -- Found CUDA_CUDA_LIBRARY=/usr/local/cuda/targets/x86_64-linux/lib/stubs/libcuda.so
   -- Found CUDA_CUDART_LIBRARY=/usr/local/cuda/lib64/libcudart.so
   -- Found CUDA_NVRTC_LIBRARY=/usr/local/cuda/lib64/libnvrtc.so
   -- Found CUDA_CUDNN_LIBRARY=CUDA_CUDNN_LIBRARY-NOTFOUND
   -- Found CUDA_CUBLAS_LIBRARY=/usr/local/cuda/lib64/libcublas.so
   -- Found CUDA_CUBLASLT_LIBRARY=/usr/local/cuda/lib64/libcublasLt.so
   -- Build with CUDA support
   -- Not found - LLVM_LIBS
   -- Fall back to using llvm-config
   -- Use llvm-config=/usr/lib/llvm-10/bin/llvm-config
   -- Found LLVM_INCLUDE_DIRS=/usr/lib/llvm-10/include
   -- Found LLVM_DEFINITIONS=-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS;-D_GNU_SOURCE;-D__STDC_CONSTANT_MACROS;-D__STDC_FORMAT_MACROS;-D__STDC_LIMIT_MACROS
   -- Found LLVM_LIBS=/usr/lib/llvm-10/lib/libLLVM-10.so
   -- Found TVM_LLVM_VERSION=100
   -- Build with LLVM 10.0.0
   -- Set TVM_LLVM_VERSION=100
   -- Arm Ethos-N driver stack PATH=/media/dyn/Data/deepLearningLibrary-linux/ethos-n-driver-stack
   CMake Error at cmake/modules/contrib/EthosN.cmake:24 (message):
     Cannot find Ethos-N,
     USE_ETHOSN=/media/dyn/Data/deepLearningLibrary-linux/ethos-n-driver-stack
   Call Stack (most recent call first):
     CMakeLists.txt:339 (include)
   
   
   -- Configuring incomplete, errors occurred!
   See also "/home/dyn/tvm/build/CMakeFiles/CMakeOutput.log".
   See also "/home/dyn/tvm/build/CMakeFiles/CMakeError.log".
   ```
   How to fix this problem?
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] gaintpd commented on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
gaintpd commented on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759435642


   @leandron Thank you very much for the tips. As I want to build the Ethos-N backend with tvm in a minimal way, I just build the driver lib and it generates for files: `libEthosNDriver.a`,  `libEthosNDriver.so`, `libEthosNSupport.a`, `libEthosNSupport.so`. And install into the default directory, with the most updated version(20.11) of Ethos-N Driver stack. Another problem arises, I get the following errors:
   ```
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc: In member function ‘tvm::relay::contrib::ethosn::NetworkWithIDs tvm::relay::contrib::ethosn::ConstructNetworkVisitor::Construct(const tvm::relay::Function&)’:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:202:32: error: too few arguments to function ‘std::shared_ptr<ethosn::support_library::Network> ethosn::support_library::CreateNetwork(const std::vector<char>&)’
     202 |   network_ = sl::CreateNetwork();
         |                                ^
   In file included from /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api_version.h:20,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/capabilities.h:34,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:27:
   /usr/local/include/ethosn_support_library/Support.hpp:1116:26: note: declared here
    1116 | std::shared_ptr<Network> CreateNetwork(const std::vector<char>& caps);
         |                          ^~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc: In static member function ‘static ethosn::support_library::CompilationOptions tvm::relay::contrib::ethosn::EthosnCompiler::CreateOptions()’:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:564:64: error: no matching function for call to ‘ethosn::support_library::CompilationOptions::CompilationOptions(std::vector<char>&)’
     564 |   sl::CompilationOptions options(variants[cfg.value()->variant]);
         |                                                                ^
   In file included from /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api_version.h:20,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/capabilities.h:34,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:27:
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘constexpr ethosn::support_library::CompilationOptions::CompilationOptions()’
      69 | struct CompilationOptions
         |        ^~~~~~~~~~~~~~~~~~
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   candidate expects 0 arguments, 1 provided
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘ethosn::support_library::CompilationOptions::CompilationOptions(const ethosn::support_library::CompilationOptions&)’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   no known conversion for argument 1 from ‘std::vector<char>’ to ‘const ethosn::support_library::CompilationOptions&’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘ethosn::support_library::CompilationOptions::CompilationOptions(ethosn::support_library::CompilationOptions&&)’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   no known conversion for argument 1 from ‘std::vector<char>’ to ‘ethosn::support_library::CompilationOptions&&’
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:579:55: error: cannot convert ‘const bool’ to ‘ethosn::support_library::CompilationOptions::DebugLevel’ in assignment
     579 |   options.m_DebugInfo.m_DumpDebugFiles = cfg.value()->dump_debug_files;
         |                                          ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
         |                                                       |
         |                                                       const bool
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:638:27: error: ‘IsDepthwiseConvolutionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     638 |         *rv = !err && sl::IsDepthwiseConvolutionSupported(params.bias_info, params.weights_info,
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:641:27: error: ‘IsConvolutionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     641 |         *rv = !err && sl::IsConvolutionSupported(params.bias_info, params.weights_info,
         |                           ^~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:651:25: error: ‘IsFullyConnectedSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     651 |       *rv = !err && sl::IsFullyConnectedSupported(params.bias_info, params.weights_info,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:660:25: error: ‘IsPoolingSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     660 |       *rv = !err && sl::IsPoolingSupported(params.pool_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:668:25: error: ‘IsPoolingSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     668 |       *rv = !err && sl::IsPoolingSupported(params.pool_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:676:25: error: ‘IsReshapeSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     676 |       *rv = !err && sl::IsReshapeSupported(params.new_shape, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:684:25: error: ‘IsAdditionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     684 |       *rv = !err && sl::IsAdditionSupported(params.lhs_info, params.rhs_info,
         |                         ^~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:693:25: error: ‘IsSigmoidSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     693 |       *rv = !err && sl::IsSigmoidSupported(params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:701:25: error: ‘IsConcatenationSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     701 |       *rv = !err && sl::IsConcatenationSupported(params.input_infos, params.concat_info);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:709:25: error: ‘IsSplitSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     709 |       *rv = !err && sl::IsSplitSupported(params.input_info, params.split_info);
         |                         ^~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:717:25: error: ‘IsDepthToSpaceSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     717 |       *rv = !err && sl::IsDepthToSpaceSupported(params.input_info, params.depth_info);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:725:25: error: ‘IsReluSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     725 |       *rv = !err && sl::IsReluSupported(params.relu_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~
   make[2]: *** [CMakeFiles/tvm_objs.dir/build.make:4340: CMakeFiles/tvm_objs.dir/src/relay/backend/contrib/ethosn/ethosn_api.cc.o] Error 1
   make[2]: *** Waiting for unfinished jobs....
   make[2]: *** [CMakeFiles/tvm_objs.dir/build.make:4327: CMakeFiles/tvm_objs.dir/src/relay/backend/contrib/ethosn/codegen.cc.o] Error 1
   make[1]: *** [CMakeFiles/Makefile2:193: CMakeFiles/tvm_objs.dir/all] Error 2
   make: *** [Makefile:130: all] Error 2
   ```
   @Leo-arm Thank you very much for your tips, When I check out the 20.08 version of Ethos-N driver stack, I get the following errors:
   ```
   g++ -o support_library/build/release/src/Support.o -c -std=c++14 -O3 -Werror -Wall -Wextra -Wformat=2 -Wno-format-nonliteral -Wctor-dtor-privacy -Woverloaded-virtual -Wsign-promo -Wstrict-overflow=2 -Wswitch-default -Wlogical-op -Wnoexcept -Wstrict-null-sentinel -Wconversion -fPIC -Icommand_stream/include -Iutils/include -Isupport_library/build/release/src -Isupport_library/src -Isupport_library/build/release/include -Isupport_library/include support_library/src/Support.cpp
   In file included from support_library/src/Graph.hpp:9,
                    from support_library/src/Compiler.hpp:10,
                    from support_library/src/Support.cpp:9:
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Operand::Consumer; _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Operand::Consumer; _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Operand::Consumer>]'
   /usr/include/c++/9/bits/vector.tcc:115:30:   required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer; _Alloc = std::allocator<ethosn::support_library::Operand::Consumer>]'
   support_library/src/Network.hpp:46:50:   required from here
   support_library/src/Network.hpp:28:19: error: but 'constexpr ethosn::support_library::Operand::Consumer::Consumer(ethosn::support_library::Operation&, size_t)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
      28 |         constexpr Consumer(Operation& operation, const size_t inputIndex)
         |                   ^~~~~~~~
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {}; _Tp = ethosn::support_library::Network]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {}; _Tp = ethosn::support_library::Network; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Network>]'
   /usr/include/c++/9/bits/shared_ptr_base.h:548:39:   required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {}; _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:679:16:   required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; _Tp = ethosn::support_library::Network; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr.h:359:59:   required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; _Tp = ethosn::support_library::Network]'
   /usr/include/c++/9/bits/shared_ptr.h:701:14:   required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}]'
   /usr/include/c++/9/bits/shared_ptr.h:717:39:   required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = ethosn::support_library::Network; _Args = {}]'
   support_library/src/Support.cpp:405:38:   required from here
   support_library/src/Network.hpp:81:5: error: but 'ethosn::support_library::Network::Network(bool)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
      81 |     Network(bool estimatePerformance = false)
         |     ^~~~~~~
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {bool}; _Tp = ethosn::support_library::Network]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {bool}; _Tp = ethosn::support_library::Network; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Network>]'
   /usr/include/c++/9/bits/shared_ptr_base.h:548:39:   required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {bool}; _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:679:16:   required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; _Tp = ethosn::support_library::Network; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr.h:359:59:   required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; _Tp = ethosn::support_library::Network]'
   /usr/include/c++/9/bits/shared_ptr.h:701:14:   required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}]'
   /usr/include/c++/9/bits/shared_ptr.h:717:39:   required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = ethosn::support_library::Network; _Args = {bool}]'
   support_library/src/Support.cpp:410:42:   required from here
   support_library/src/Network.hpp:81:5: error: but 'ethosn::support_library::Network::Network(bool)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
   cc1plus: all warnings being treated as errors
   scons: *** [support_library/build/release/src/Support.o] Error 1
   scons: building terminated because of errors.
   ```
   I did not build the Ethos-N kernel driver, is this matter?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
comaniac commented on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-758857442


   cc @mbaret 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] gaintpd commented on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
gaintpd commented on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759491340


   As @Leo-arm advise us to continue the discuss in https://github.com/ARM-software/ethos-n-driver-stack/issues/1. I will close this issue now, many thanks goes to @comaniac @leandron @Leo-arm 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] gaintpd edited a comment on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
gaintpd edited a comment on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759435642


   @leandron Thank you very much for the tips. As I want to build the Ethos-N backend with tvm in a minimal way, I just build the driver lib and it generates four files: `libEthosNDriver.a`,  `libEthosNDriver.so`, `libEthosNSupport.a`, `libEthosNSupport.so`. And install into the default directory, with the most updated version(20.11) of Ethos-N Driver stack. Another problem arises, I get the following errors:
   ```
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc: In member function ‘tvm::relay::contrib::ethosn::NetworkWithIDs tvm::relay::contrib::ethosn::ConstructNetworkVisitor::Construct(const tvm::relay::Function&)’:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:202:32: error: too few arguments to function ‘std::shared_ptr<ethosn::support_library::Network> ethosn::support_library::CreateNetwork(const std::vector<char>&)’
     202 |   network_ = sl::CreateNetwork();
         |                                ^
   In file included from /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api_version.h:20,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/capabilities.h:34,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:27:
   /usr/local/include/ethosn_support_library/Support.hpp:1116:26: note: declared here
    1116 | std::shared_ptr<Network> CreateNetwork(const std::vector<char>& caps);
         |                          ^~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc: In static member function ‘static ethosn::support_library::CompilationOptions tvm::relay::contrib::ethosn::EthosnCompiler::CreateOptions()’:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:564:64: error: no matching function for call to ‘ethosn::support_library::CompilationOptions::CompilationOptions(std::vector<char>&)’
     564 |   sl::CompilationOptions options(variants[cfg.value()->variant]);
         |                                                                ^
   In file included from /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api_version.h:20,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/capabilities.h:34,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:27:
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘constexpr ethosn::support_library::CompilationOptions::CompilationOptions()’
      69 | struct CompilationOptions
         |        ^~~~~~~~~~~~~~~~~~
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   candidate expects 0 arguments, 1 provided
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘ethosn::support_library::CompilationOptions::CompilationOptions(const ethosn::support_library::CompilationOptions&)’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   no known conversion for argument 1 from ‘std::vector<char>’ to ‘const ethosn::support_library::CompilationOptions&’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘ethosn::support_library::CompilationOptions::CompilationOptions(ethosn::support_library::CompilationOptions&&)’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   no known conversion for argument 1 from ‘std::vector<char>’ to ‘ethosn::support_library::CompilationOptions&&’
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:579:55: error: cannot convert ‘const bool’ to ‘ethosn::support_library::CompilationOptions::DebugLevel’ in assignment
     579 |   options.m_DebugInfo.m_DumpDebugFiles = cfg.value()->dump_debug_files;
         |                                          ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
         |                                                       |
         |                                                       const bool
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:638:27: error: ‘IsDepthwiseConvolutionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     638 |         *rv = !err && sl::IsDepthwiseConvolutionSupported(params.bias_info, params.weights_info,
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:641:27: error: ‘IsConvolutionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     641 |         *rv = !err && sl::IsConvolutionSupported(params.bias_info, params.weights_info,
         |                           ^~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:651:25: error: ‘IsFullyConnectedSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     651 |       *rv = !err && sl::IsFullyConnectedSupported(params.bias_info, params.weights_info,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:660:25: error: ‘IsPoolingSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     660 |       *rv = !err && sl::IsPoolingSupported(params.pool_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:668:25: error: ‘IsPoolingSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     668 |       *rv = !err && sl::IsPoolingSupported(params.pool_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:676:25: error: ‘IsReshapeSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     676 |       *rv = !err && sl::IsReshapeSupported(params.new_shape, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:684:25: error: ‘IsAdditionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     684 |       *rv = !err && sl::IsAdditionSupported(params.lhs_info, params.rhs_info,
         |                         ^~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:693:25: error: ‘IsSigmoidSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     693 |       *rv = !err && sl::IsSigmoidSupported(params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:701:25: error: ‘IsConcatenationSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     701 |       *rv = !err && sl::IsConcatenationSupported(params.input_infos, params.concat_info);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:709:25: error: ‘IsSplitSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     709 |       *rv = !err && sl::IsSplitSupported(params.input_info, params.split_info);
         |                         ^~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:717:25: error: ‘IsDepthToSpaceSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     717 |       *rv = !err && sl::IsDepthToSpaceSupported(params.input_info, params.depth_info);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:725:25: error: ‘IsReluSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     725 |       *rv = !err && sl::IsReluSupported(params.relu_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~
   make[2]: *** [CMakeFiles/tvm_objs.dir/build.make:4340: CMakeFiles/tvm_objs.dir/src/relay/backend/contrib/ethosn/ethosn_api.cc.o] Error 1
   make[2]: *** Waiting for unfinished jobs....
   make[2]: *** [CMakeFiles/tvm_objs.dir/build.make:4327: CMakeFiles/tvm_objs.dir/src/relay/backend/contrib/ethosn/codegen.cc.o] Error 1
   make[1]: *** [CMakeFiles/Makefile2:193: CMakeFiles/tvm_objs.dir/all] Error 2
   make: *** [Makefile:130: all] Error 2
   ```
   @Leo-arm Thank you very much for your tips, When I check out the 20.08 version of Ethos-N driver stack, I get the following errors:
   ```
   g++ -o support_library/build/release/src/Support.o -c -std=c++14 -O3 -Werror -Wall -Wextra -Wformat=2 -Wno-format-nonliteral -Wctor-dtor-privacy -Woverloaded-virtual -Wsign-promo -Wstrict-overflow=2 -Wswitch-default -Wlogical-op -Wnoexcept -Wstrict-null-sentinel -Wconversion -fPIC -Icommand_stream/include -Iutils/include -Isupport_library/build/release/src -Isupport_library/src -Isupport_library/build/release/include -Isupport_library/include support_library/src/Support.cpp
   In file included from support_library/src/Graph.hpp:9,
                    from support_library/src/Compiler.hpp:10,
                    from support_library/src/Support.cpp:9:
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Operand::Consumer; _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Operand::Consumer; _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Operand::Consumer>]'
   /usr/include/c++/9/bits/vector.tcc:115:30:   required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer; _Alloc = std::allocator<ethosn::support_library::Operand::Consumer>]'
   support_library/src/Network.hpp:46:50:   required from here
   support_library/src/Network.hpp:28:19: error: but 'constexpr ethosn::support_library::Operand::Consumer::Consumer(ethosn::support_library::Operation&, size_t)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
      28 |         constexpr Consumer(Operation& operation, const size_t inputIndex)
         |                   ^~~~~~~~
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {}; _Tp = ethosn::support_library::Network]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {}; _Tp = ethosn::support_library::Network; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Network>]'
   /usr/include/c++/9/bits/shared_ptr_base.h:548:39:   required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {}; _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:679:16:   required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; _Tp = ethosn::support_library::Network; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr.h:359:59:   required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; _Tp = ethosn::support_library::Network]'
   /usr/include/c++/9/bits/shared_ptr.h:701:14:   required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}]'
   /usr/include/c++/9/bits/shared_ptr.h:717:39:   required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = ethosn::support_library::Network; _Args = {}]'
   support_library/src/Support.cpp:405:38:   required from here
   support_library/src/Network.hpp:81:5: error: but 'ethosn::support_library::Network::Network(bool)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
      81 |     Network(bool estimatePerformance = false)
         |     ^~~~~~~
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {bool}; _Tp = ethosn::support_library::Network]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {bool}; _Tp = ethosn::support_library::Network; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Network>]'
   /usr/include/c++/9/bits/shared_ptr_base.h:548:39:   required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {bool}; _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:679:16:   required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; _Tp = ethosn::support_library::Network; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr.h:359:59:   required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; _Tp = ethosn::support_library::Network]'
   /usr/include/c++/9/bits/shared_ptr.h:701:14:   required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}]'
   /usr/include/c++/9/bits/shared_ptr.h:717:39:   required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = ethosn::support_library::Network; _Args = {bool}]'
   support_library/src/Support.cpp:410:42:   required from here
   support_library/src/Network.hpp:81:5: error: but 'ethosn::support_library::Network::Network(bool)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
   cc1plus: all warnings being treated as errors
   scons: *** [support_library/build/release/src/Support.o] Error 1
   scons: building terminated because of errors.
   ```
   I did not build the Ethos-N kernel driver, is this matter?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] gaintpd commented on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
gaintpd commented on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759437973


   @Leo-arm the `scons` script rename the header file directory name, so the problem is not build the Ethos-N driver Stack.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] gaintpd edited a comment on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
gaintpd edited a comment on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759435642


   @leandron Thank you very much for the tips. As I want to build the Ethos-N backend with tvm in a minimal way, I just build the driver lib and it generates four files: `libEthosNDriver.a`,  `libEthosNDriver.so`, `libEthosNSupport.a`, `libEthosNSupport.so`. And install into the default directory, with the most updated version(20.11) of Ethos-N Driver stack. Another problem arises, I get the following errors:
   ```
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc: In member function ‘tvm::relay::contrib::ethosn::NetworkWithIDs tvm::relay::contrib::ethosn::ConstructNetworkVisitor::Construct(const tvm::relay::Function&)’:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:202:32: error: too few arguments to function ‘std::shared_ptr<ethosn::support_library::Network> ethosn::support_library::CreateNetwork(const std::vector<char>&)’
     202 |   network_ = sl::CreateNetwork();
         |                                ^
   In file included from /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api_version.h:20,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/capabilities.h:34,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:27:
   /usr/local/include/ethosn_support_library/Support.hpp:1116:26: note: declared here
    1116 | std::shared_ptr<Network> CreateNetwork(const std::vector<char>& caps);
         |                          ^~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc: In static member function ‘static ethosn::support_library::CompilationOptions tvm::relay::contrib::ethosn::EthosnCompiler::CreateOptions()’:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:564:64: error: no matching function for call to ‘ethosn::support_library::CompilationOptions::CompilationOptions(std::vector<char>&)’
     564 |   sl::CompilationOptions options(variants[cfg.value()->variant]);
         |                                                                ^
   In file included from /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api_version.h:20,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/capabilities.h:34,
                    from /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:27:
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘constexpr ethosn::support_library::CompilationOptions::CompilationOptions()’
      69 | struct CompilationOptions
         |        ^~~~~~~~~~~~~~~~~~
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   candidate expects 0 arguments, 1 provided
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘ethosn::support_library::CompilationOptions::CompilationOptions(const ethosn::support_library::CompilationOptions&)’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   no known conversion for argument 1 from ‘std::vector<char>’ to ‘const ethosn::support_library::CompilationOptions&’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note: candidate: ‘ethosn::support_library::CompilationOptions::CompilationOptions(ethosn::support_library::CompilationOptions&&)’
   /usr/local/include/ethosn_support_library/Support.hpp:69:8: note:   no known conversion for argument 1 from ‘std::vector<char>’ to ‘ethosn::support_library::CompilationOptions&&’
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/codegen.cc:579:55: error: cannot convert ‘const bool’ to ‘ethosn::support_library::CompilationOptions::DebugLevel’ in assignment
     579 |   options.m_DebugInfo.m_DumpDebugFiles = cfg.value()->dump_debug_files;
         |                                          ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
         |                                                       |
         |                                                       const bool
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:638:27: error: ‘IsDepthwiseConvolutionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     638 |         *rv = !err && sl::IsDepthwiseConvolutionSupported(params.bias_info, params.weights_info,
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:641:27: error: ‘IsConvolutionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     641 |         *rv = !err && sl::IsConvolutionSupported(params.bias_info, params.weights_info,
         |                           ^~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:651:25: error: ‘IsFullyConnectedSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     651 |       *rv = !err && sl::IsFullyConnectedSupported(params.bias_info, params.weights_info,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:660:25: error: ‘IsPoolingSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     660 |       *rv = !err && sl::IsPoolingSupported(params.pool_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:668:25: error: ‘IsPoolingSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     668 |       *rv = !err && sl::IsPoolingSupported(params.pool_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:676:25: error: ‘IsReshapeSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     676 |       *rv = !err && sl::IsReshapeSupported(params.new_shape, params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:684:25: error: ‘IsAdditionSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     684 |       *rv = !err && sl::IsAdditionSupported(params.lhs_info, params.rhs_info,
         |                         ^~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:693:25: error: ‘IsSigmoidSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     693 |       *rv = !err && sl::IsSigmoidSupported(params.input_info);
         |                         ^~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:701:25: error: ‘IsConcatenationSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     701 |       *rv = !err && sl::IsConcatenationSupported(params.input_infos, params.concat_info);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:709:25: error: ‘IsSplitSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     709 |       *rv = !err && sl::IsSplitSupported(params.input_info, params.split_info);
         |                         ^~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:717:25: error: ‘IsDepthToSpaceSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     717 |       *rv = !err && sl::IsDepthToSpaceSupported(params.input_info, params.depth_info);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc: In lambda function:
   /home/dyn/tvm/src/relay/backend/contrib/ethosn/ethosn_api.cc:725:25: error: ‘IsReluSupported’ is not a member of ‘tvm::relay::contrib::ethosn::sl’
     725 |       *rv = !err && sl::IsReluSupported(params.relu_info, params.input_info);
         |                         ^~~~~~~~~~~~~~~
   make[2]: *** [CMakeFiles/tvm_objs.dir/build.make:4340: CMakeFiles/tvm_objs.dir/src/relay/backend/contrib/ethosn/ethosn_api.cc.o] Error 1
   make[2]: *** Waiting for unfinished jobs....
   make[2]: *** [CMakeFiles/tvm_objs.dir/build.make:4327: CMakeFiles/tvm_objs.dir/src/relay/backend/contrib/ethosn/codegen.cc.o] Error 1
   make[1]: *** [CMakeFiles/Makefile2:193: CMakeFiles/tvm_objs.dir/all] Error 2
   make: *** [Makefile:130: all] Error 2
   ```
   @Leo-arm Thank you very much for your tips, When I check out the 20.08 version of Ethos-N driver stack, I get the following errors:
   ```
   g++ -o support_library/build/release/src/Support.o -c -std=c++14 -O3 -Werror -Wall -Wextra -Wformat=2 -Wno-format-nonliteral -Wctor-dtor-privacy -Woverloaded-virtual -Wsign-promo -Wstrict-overflow=2 -Wswitch-default -Wlogical-op -Wnoexcept -Wstrict-null-sentinel -Wconversion -fPIC -Icommand_stream/include -Iutils/include -Isupport_library/build/release/src -Isupport_library/src -Isupport_library/build/release/include -Isupport_library/include support_library/src/Support.cpp
   In file included from support_library/src/Graph.hpp:9,
                    from support_library/src/Compiler.hpp:10,
                    from support_library/src/Support.cpp:9:
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Operand::Consumer; _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Operand::Consumer; _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Operand::Consumer>]'
   /usr/include/c++/9/bits/vector.tcc:115:30:   required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {ethosn::support_library::Operation&, const long unsigned int&}; _Tp = ethosn::support_library::Operand::Consumer; _Alloc = std::allocator<ethosn::support_library::Operand::Consumer>]'
   support_library/src/Network.hpp:46:50:   required from here
   support_library/src/Network.hpp:28:19: error: but 'constexpr ethosn::support_library::Operand::Consumer::Consumer(ethosn::support_library::Operation&, size_t)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
      28 |         constexpr Consumer(Operation& operation, const size_t inputIndex)
         |                   ^~~~~~~~
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {}; _Tp = ethosn::support_library::Network]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {}; _Tp = ethosn::support_library::Network; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Network>]'
   /usr/include/c++/9/bits/shared_ptr_base.h:548:39:   required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {}; _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:679:16:   required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; _Tp = ethosn::support_library::Network; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr.h:359:59:   required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}; _Tp = ethosn::support_library::Network]'
   /usr/include/c++/9/bits/shared_ptr.h:701:14:   required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {}]'
   /usr/include/c++/9/bits/shared_ptr.h:717:39:   required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = ethosn::support_library::Network; _Args = {}]'
   support_library/src/Support.cpp:405:38:   required from here
   support_library/src/Network.hpp:81:5: error: but 'ethosn::support_library::Network::Network(bool)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
      81 |     Network(bool estimatePerformance = false)
         |     ^~~~~~~
   /usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {bool}; _Tp = ethosn::support_library::Network]':
   /usr/include/c++/9/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ethosn::support_library::Network; _Args = {bool}; _Tp = ethosn::support_library::Network; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ethosn::support_library::Network>]'
   /usr/include/c++/9/bits/shared_ptr_base.h:548:39:   required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {bool}; _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:679:16:   required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; _Tp = ethosn::support_library::Network; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
   /usr/include/c++/9/bits/shared_ptr.h:359:59:   required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}; _Tp = ethosn::support_library::Network]'
   /usr/include/c++/9/bits/shared_ptr.h:701:14:   required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ethosn::support_library::Network; _Alloc = std::allocator<ethosn::support_library::Network>; _Args = {bool}]'
   /usr/include/c++/9/bits/shared_ptr.h:717:39:   required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = ethosn::support_library::Network; _Args = {bool}]'
   support_library/src/Support.cpp:410:42:   required from here
   support_library/src/Network.hpp:81:5: error: but 'ethosn::support_library::Network::Network(bool)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
   cc1plus: all warnings being treated as errors
   scons: *** [support_library/build/release/src/Support.o] Error 1
   scons: building terminated because of errors.
   ```
   I did not build the Ethos-N kernel module, is this matter?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] gaintpd closed issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
gaintpd closed issue #7261:
URL: https://github.com/apache/tvm/issues/7261


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] gaintpd edited a comment on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
gaintpd edited a comment on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759437973


   @Leo-arm the `scons` script renames the header file directory name directly, so the problem is not built the Ethos-N driver Stack.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] Leo-arm commented on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
Leo-arm commented on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759287459


   The CMake script looks for header files in certain directories and that is clearly failing.
   You also want to build the 20.08 version of the Ethos-N driver stack, not 20.11.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] Leo-arm commented on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
Leo-arm commented on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-759482758


   As this is an issue in the Ethos-N driver stack, you might be better off asking in that GitHub repo. I don't see any obvious issue but I am not intimately familiar with their code. You are correct when you say you should end up with those three libraries; there is no need to build the kernel module. Once these are in place and pointed to in config.cmake, the TVM code should build fine.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] leandron commented on issue #7261: [BUG][BYOC][Ethos-N]unable to compile tvm with ethos-n-driver-stack

Posted by GitBox <gi...@apache.org>.
leandron commented on issue #7261:
URL: https://github.com/apache/tvm/issues/7261#issuecomment-758859469


   Hi @gaintpd,
   
   Have you built the driver stack, prior to building TVM?
   
   If not, you can follow the [official documentation](https://github.com/ARM-software/ethos-n-driver-stack#build-tools), or the steps described here https://github.com/apache/tvm/blob/main/docker/install/ubuntu_install_ethosn_driver_stack.sh. Hope that helps.
   
   Also cc @Leo-arm.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org