We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I tried to build tvm with USE_SDACCEL=ON , I found it failed with the following error.
USE_SDACCEL=ON
➜ cmake --build . [20/116] Building CXX object CMakeFiles/tvm.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o FAILED: CMakeFiles/tvm.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o /usr/bin/g++ -DDMLC_USE_FOPEN64=0 -DNDEBUG -DTVM_LLVM_VERSION=80 -DTVM_THREADPOOL_USE_OPENMP=0 -Dtvm_EXPORTS -I../include -I../3rdparty/dlpack/include -I../3rdparty/dmlc-core/include -I../3rdparty/rang/include -I../3rdparty/compiler-rt -I../3rdparty/picojson -I../vta/include -I/home/linuxbrew/.linuxbrew/Cellar/llvm/8.0.0_1/include -I../topi/include -std=c++11 -O0 -g -Wall -fPIC -rdynamic -g -fPIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -pthread -MD -MT CMakeFiles/tvm.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o -MF CMakeFiles/tvm.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o.d -o CMakeFiles/tvm.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o -c ../src/runtime/opencl/sdaccel/sdaccel_module.cc ../src/runtime/opencl/sdaccel/sdaccel_module.cc: In function ‘tvm::runtime::Module tvm::runtime::SDAccelModuleCreate(std::__cxx11::string, std::__cxx11::string, std::unordered_map<std::__cxx11::basic_string<char>, tvm::runtime::FunctionInfo>, std::__cxx11::string)’: ../src/runtime/opencl/sdaccel/sdaccel_module.cc:56:18: error: no matching function for call to ‘tvm::runtime::Module::Module(std::shared_ptr<tvm::runtime::SDAccelModuleNode>&)’ return Module(n); ^ In file included from ../include/tvm/runtime/packed_func.h:40:0, from ../include/tvm/runtime/registry.h:48, from ../src/runtime/opencl/sdaccel/sdaccel_module.cc:24: ../include/tvm/runtime/module.h:53:12: note: candidate: tvm::runtime::Module::Module(tvm::runtime::ObjectPtr<tvm::runtime::Object>) explicit Module(ObjectPtr<Object> n) ^ ../include/tvm/runtime/module.h:53:12: note: no known conversion for argument 1 from ‘std::shared_ptr<tvm::runtime::SDAccelModuleNode>’ to ‘tvm::runtime::ObjectPtr<tvm::runtime::Object>’ ../include/tvm/runtime/module.h:51:3: note: candidate: tvm::runtime::Module::Module() Module() {} ^ ../include/tvm/runtime/module.h:51:3: note: candidate expects 0 arguments, 1 provided ../include/tvm/runtime/module.h:49:7: note: candidate: tvm::runtime::Module::Module(const tvm::runtime::Module&) class Module : public ObjectRef { ^ ../include/tvm/runtime/module.h:49:7: note: no known conversion for argument 1 from ‘std::shared_ptr<tvm::runtime::SDAccelModuleNode>’ to ‘const tvm::runtime::Module&’ ../include/tvm/runtime/module.h:49:7: note: candidate: tvm::runtime::Module::Module(tvm::runtime::Module&&) ../include/tvm/runtime/module.h:49:7: note: no known conversion for argument 1 from ‘std::shared_ptr<tvm::runtime::SDAccelModuleNode>’ to ‘tvm::runtime::Module&&’ [52/116] Building CXX object CMakeFiles/tvm_runtime.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o FAILED: CMakeFiles/tvm_runtime.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o /usr/bin/g++ -DDMLC_USE_FOPEN64=0 -DTVM_LLVM_VERSION=80 -DTVM_THREADPOOL_USE_OPENMP=0 -Dtvm_runtime_EXPORTS -I../include -I../3rdparty/dlpack/include -I../3rdparty/dmlc-core/include -I../3rdparty/rang/include -I../3rdparty/compiler-rt -I../3rdparty/picojson -I../vta/include -I/home/linuxbrew/.linuxbrew/Cellar/llvm/8.0.0_1/include -std=c++11 -O0 -g -Wall -fPIC -rdynamic -g -fPIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -pthread -MD -MT CMakeFiles/tvm_runtime.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o -MF CMakeFiles/tvm_runtime.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o.d -o CMakeFiles/tvm_runtime.dir/src/runtime/opencl/sdaccel/sdaccel_module.cc.o -c ../src/runtime/opencl/sdaccel/sdaccel_module.cc ../src/runtime/opencl/sdaccel/sdaccel_module.cc: In function ‘tvm::runtime::Module tvm::runtime::SDAccelModuleCreate(std::__cxx11::string, std::__cxx11::string, std::unordered_map<std::__cxx11::basic_string<char>, tvm::runtime::FunctionInfo>, std::__cxx11::string)’: ../src/runtime/opencl/sdaccel/sdaccel_module.cc:56:18: error: no matching function for call to ‘tvm::runtime::Module::Module(std::shared_ptr<tvm::runtime::SDAccelModuleNode>&)’ return Module(n); ^ In file included from ../include/tvm/runtime/packed_func.h:40:0, from ../include/tvm/runtime/registry.h:48, from ../src/runtime/opencl/sdaccel/sdaccel_module.cc:24: ../include/tvm/runtime/module.h:53:12: note: candidate: tvm::runtime::Module::Module(tvm::runtime::ObjectPtr<tvm::runtime::Object>) explicit Module(ObjectPtr<Object> n) ^ ../include/tvm/runtime/module.h:53:12: note: no known conversion for argument 1 from ‘std::shared_ptr<tvm::runtime::SDAccelModuleNode>’ to ‘tvm::runtime::ObjectPtr<tvm::runtime::Object>’ ../include/tvm/runtime/module.h:51:3: note: candidate: tvm::runtime::Module::Module() Module() {} ^ ../include/tvm/runtime/module.h:51:3: note: candidate expects 0 arguments, 1 provided ../include/tvm/runtime/module.h:49:7: note: candidate: tvm::runtime::Module::Module(const tvm::runtime::Module&) class Module : public ObjectRef { ^ ../include/tvm/runtime/module.h:49:7: note: no known conversion for argument 1 from ‘std::shared_ptr<tvm::runtime::SDAccelModuleNode>’ to ‘const tvm::runtime::Module&’ ../include/tvm/runtime/module.h:49:7: note: candidate: tvm::runtime::Module::Module(tvm::runtime::Module&&) ../include/tvm/runtime/module.h:49:7: note: no known conversion for argument 1 from ‘std::shared_ptr<tvm::runtime::SDAccelModuleNode>’ to ‘tvm::runtime::Module&&’ [101/116] Building CXX object CMakeFiles/tvm.dir/src/codegen/llvm/codegen_llvm.cc.o ninja: build stopped: subcommand failed.
I fixed it by changing sdaccel_module.cc like below, does this make sense?? if it's ok, I'll make the pull request.
sdaccel_module.cc
diff --git a/src/runtime/opencl/sdaccel/sdaccel_module.cc b/src/runtime/opencl/sdaccel/sdaccel_module.cc index 5436b418..31db46af 100644 --- a/src/runtime/opencl/sdaccel/sdaccel_module.cc +++ b/src/runtime/opencl/sdaccel/sdaccel_module.cc @@ -50,8 +50,7 @@ Module SDAccelModuleCreate( std::string fmt, std::unordered_map<std::string, FunctionInfo> fmap, std::string source) { - std::shared_ptr<SDAccelModuleNode> n = - std::make_shared<SDAccelModuleNode>(data, fmt, fmap, source); + auto n = make_object<SDAccelModuleNode>(data, fmt, fmap, source); n->Init(); return Module(n); }
The text was updated successfully, but these errors were encountered:
The PR #4492 is already out to fix this.
Sorry, something went wrong.
@masahi I needed to check issues more carefully. anyway thanks!
No branches or pull requests
When I tried to build tvm with
USE_SDACCEL=ON
, I found it failed with the following error.I fixed it by changing
sdaccel_module.cc
like below, does this make sense??if it's ok, I'll make the pull request.
The text was updated successfully, but these errors were encountered: