tvm icon indicating copy to clipboard operation
tvm copied to clipboard

Error when installing TVM on Raspberry (PyTorch 1.1)

Open snippler opened this issue 5 years ago • 1 comments

This is the error that I get incl. some text before. I make it to ca. 95%. Any idea anyone what is wrong?

/usr/include/c++/8/bits/range_access.h:87:5: note: 'std::begin' begin(_Tp (&__arr)[_Nm]) ^~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:201:43: error: 'end' was not declared in this scope for (const auto& elem : val.toIntList()) { ^ /home/pi/code/tvm/torch_tvm/compiler.cpp:201:43: note: suggested alternatives: In file included from /usr/include/c++/8/string:51, from /usr/include/c++/8/bits/locale_classes.h:40, from /usr/include/c++/8/bits/ios_base.h:41, from /usr/include/c++/8/ios:42, from /usr/include/c++/8/istream:38, from /usr/include/c++/8/sstream:38, from /usr/local/lib/python2.7/dist-packages/torch/include/c10/macros/Macros.h:111, from /usr/local/lib/python2.7/dist-packages/torch/include/c10/core/DeviceType.h:8, from /usr/local/lib/python2.7/dist-packages/torch/include/c10/core/Device.h:3, from /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/Tensor.h:3, from /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/TensorMethods.h:3, from /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/jit_type.h:3, from /usr/local/lib/python2.7/dist-packages/torch/include/torch/csrc/jit/argument_spec.h:3, from /home/pi/code/tvm/torch_tvm/compiler.h:3, from /home/pi/code/tvm/torch_tvm/compiler.cpp:1: /usr/include/c++/8/bits/range_access.h:97:5: note: 'std::end' end(_Tp (&__arr)[_Nm]) ^~~ In file included from /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/jit_type.h:6, from /usr/local/lib/python2.7/dist-packages/torch/include/torch/csrc/jit/argument_spec.h:3, from /home/pi/code/tvm/torch_tvm/compiler.h:3, from /home/pi/code/tvm/torch_tvm/compiler.cpp:1: /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/aten_interned_strings.h:776:9: note: 'c10::attr::end' (attr, end)
^~~ /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/interned_strings.h:322:35: note: in definition of macro 'DEFINE_SYMBOL' namespace ns { constexpr Symbol s(static_cast<unique_t>(keys::ns####s)); } ^ /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/interned_strings.h:159:3: note: in expansion of macro 'FORALL_ATTR_BASE_SYMBOLS' FORALL_ATTR_BASE_SYMBOLS(
)
^~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/lib/python2.7/dist-packages/torch/include/ATen/core/interned_strings.h:323:1: note: in expansion of macro 'FORALL_NS_SYMBOLS' FORALL_NS_SYMBOLS(DEFINE_SYMBOL) ^~~~~~~~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:209:3: error: 'TORCH_CHECK' was not declared in this scope TORCH_CHECK( ^~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:209:3: note: suggested alternative: 'AT_CHECK' TORCH_CHECK( ^~~~~~~~~~~ AT_CHECK /home/pi/code/tvm/torch_tvm/compiler.cpp: In static member function 'static tvm::relay::Function TVMCompiler::convertToRelay(std::shared_ptrtorch::jit::Graph, TVMContext, std::unordered_map<torch::jit::Value*, TVMGraphInputInfo>)': /home/pi/code/tvm/torch_tvm/compiler.cpp:221:5: error: 'TORCH_INTERNAL_ASSERT' was not declared in this scope TORCH_INTERNAL_ASSERT(input->isCompleteTensor()); ^~~~~~~~~~~~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:319:5: error: 'TORCH_INTERNAL_ASSERT' was not declared in this scope TORCH_INTERNAL_ASSERT(value_map.find(sg_output) != value_map.end()); ^~~~~~~~~~~~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:326:3: error: 'TORCH_CHECK' was not declared in this scope TORCH_CHECK( ^~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:326:3: note: suggested alternative: 'AT_CHECK' TORCH_CHECK( ^~~~~~~~~~~ AT_CHECK /home/pi/code/tvm/torch_tvm/compiler.cpp: In constructor 'TVMCompiler::TVMCompiler(const torch::jit::Node, int, bool, bool, bool, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string)': /home/pi/code/tvm/torch_tvm/compiler.cpp:362:3: error: 'TORCH_INTERNAL_ASSERT' was not declared in this scope TORCH_INTERNAL_ASSERT(pfb); ^~~~~~~~~~~~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp: In member function 'void TVMCompiler::run(torch::jit::Stack&)': /home/pi/code/tvm/torch_tvm/compiler.cpp:440:5: error: 'TORCH_INTERNAL_ASSERT' was not declared in this scope TORCH_INTERNAL_ASSERT(pfr); ^~~~~~~~~~~~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:443:9: error: 'TORCH_CHECK' was not declared in this scope TORCH_CHECK(pfr, "TVM must be compiled with debug runtime. " ^~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:443:9: note: suggested alternative: 'AT_CHECK' TORCH_CHECK(pfr, "TVM must be compiled with debug runtime. " ^~~~~~~~~~~ AT_CHECK /home/pi/code/tvm/torch_tvm/compiler.cpp:466:5: error: 'TORCH_CHECK' was not declared in this scope TORCH_CHECK( ^~~~~~~~~~~ /home/pi/code/tvm/torch_tvm/compiler.cpp:466:5: note: suggested alternative: 'AT_CHECK' TORCH_CHECK( ^~~~~~~~~~~ AT_CHECK make[2]: *** [CMakeFiles/_torch_tvm.dir/build.make:284: CMakeFiles/_torch_tvm.dir/torch_tvm/memory_utils.cpp.o] Error 1 /home/pi/code/tvm/torch_tvm/compiler.cpp: In static member function 'static tvm::relay::Expr TVMCompiler::convertToRelay(const c10::IValue&, TVMContext)': /home/pi/code/tvm/torch_tvm/compiler.cpp:211:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[2]: *** [CMakeFiles/_torch_tvm.dir/build.make:63: CMakeFiles/_torch_tvm.dir/torch_tvm/compiler.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:74: CMakeFiles/_torch_tvm.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 Traceback (most recent call last): File "setup.py", line 273, in url='https://github.com/pytorch/tvm', File "/usr/lib/python2.7/dist-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 203, in run setuptools.command.install.install.run(self) File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 65, in run orig.install.run(self) File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run self.run_command('build') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run self.run_command(cmd_name) File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 187, in run self.run_command('cmake_build') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 176, in run self._run_build() File "setup.py", line 165, in _run_build subprocess.check_call(build_args) File "/usr/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '[u'/usr/local/bin/cmake', u'--build', '.', u'--', u'-j', '4']' returned non-zero exit status 2

snippler avatar Oct 17 '19 15:10 snippler

I noticed that the actual error message was displayed before:

/home/pi/tvm/torch_tvm/register.cpp:129:16: error: inconsistent types 'unsigned int' and 'long unsigned int' deduced for lambda return type return 0UL; /home/pi/tvm/torch_tvm/register.cpp:137:25: error: conversion from 'tvm::runtime::TVMArgValue' to 'size_t' {aka 'unsigned int'} is ambigous size_t id = args[0];

I thought it means that I have to change the code for 32 bit system by changing to return 0U Indeed the first error disappears but the second error is kept. What could be the reason?

snippler avatar Oct 18 '19 09:10 snippler