Closed Manjunath-mlp closed 1 month ago
Please never change files in the build directory
Change the .cu files instead even if you want only a cpu build.
Please post detailed error logs. Otherwise, only you know what bad things happened. We don't know what is happening and we cannot help you.
so I encountered this error.after i ran python3 setup.py install.
[ 84%] Linking CXX executable ../../../bin/hlg_decode
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function std::unique_ptr<c10::C10FlagParser, std::default_delete<c10::C10FlagParser> > c10::Registerer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::unique_ptr<c10::C10FlagParser, std::default_delete<c10::C10FlagParser> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_num_bins>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': hlg_decode.cc:(.text+0x28): undefined reference to
bool c10::C10FlagParser::Parsebool c10::C10FlagParser::Parse<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
std::unique_ptr<c10::C10FlagParser, std::default_deletebool c10::C10FlagParser::Parse<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
std::unique_ptr<c10::C10FlagParser, std::default_deletebool c10::C10FlagParser::Parse<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
std::unique_ptr<c10::C10FlagParser, std::default_deletebool c10::C10FlagParser::Parse<double>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
std::unique_ptr<c10::C10FlagParser, std::default_deletebool c10::C10FlagParser::Parse<double>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
std::unique_ptr<c10::C10FlagParser, std::default_deletebool c10::C10FlagParser::Parse<double>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
std::unique_ptr<c10::C10FlagParser, std::default_deletestd::unique_ptr<c10::C10FlagParser, std::default_delete<c10::C10FlagParser> > c10::Registerer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::unique_ptr<c10::C10FlagParser, std::default_delete<c10::C10FlagParser> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_word_table>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': hlg_decode.cc:(.text+0x328): undefined reference to
bool c10::C10FlagParser::Parse<std::cxx11::basic_string<char, std::char_traitsstd::unique_ptr<c10::C10FlagParser, std::default_delete<c10::C10FlagParser> > c10::Registerer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::unique_ptr<c10::C10FlagParser, std::default_delete<c10::C10FlagParser> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_hlg>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': hlg_decode.cc:(.text+0x388): undefined reference to
bool c10::C10FlagParser::Parse<std::cxx11::basic_string<char, std::char_traitsbool c10::C10FlagParser::Parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
std::unique_ptr<c10::C10FlagParser, std::default_deletebool c10::C10FlagParser::Parse<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
c10::fromIntArrayRefSlow(c10::ArrayRefc10::IValue::destroy()': hlg_decode.cc:(.text._ZN3c106IValue7destroyEv[_ZN3c106IValue7destroyEv]+0x29): undefined reference to
c10::UndefinedTensorImpl::_singleton'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function c10::IValue::IValue(c10::IValue::Payload const&, c10::IValue::Tag)': hlg_decode.cc:(.text._ZN3c106IValueC2ERKNS0_7PayloadENS0_3TagE[_ZN3c106IValueC5ERKNS0_7PayloadENS0_3TagE]+0x23): undefined reference to
c10::UndefinedTensorImpl::_singleton'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function c10::IValue::IValue(c10::IValue const&)': hlg_decode.cc:(.text._ZN3c106IValueC2ERKS0_[_ZN3c106IValueC5ERKS0_]+0x2a): undefined reference to
c10::UndefinedTensorImpl::_singleton'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function c10::detail::DictKeyHash::operator()(c10::IValue const&) const': hlg_decode.cc:(.text._ZNK3c106detail11DictKeyHashclERKNS_6IValueE[_ZNK3c106detail11DictKeyHashclERKNS_6IValueE]+0x10e): undefined reference to
c10::UndefinedTensorImpl::_singleton'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function k2::internal::Logger const& k2::internal::Logger::operator<< <c10::Device>(c10::Device const&) const': hlg_decode.cc:(.text._ZNK2k28internal6LoggerlsIN3c106DeviceEEERKS1_RKT_[_ZNK2k28internal6LoggerlsIN3c106DeviceEEERKS1_RKT_]+0x3d): undefined reference to
c10::operator<<(std::ostream&, c10::Device const&)'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function c10::optional_base<torch::jit::Method>::~optional_base()': hlg_decode.cc:(.text._ZN3c1013optional_baseIN5torch3jit6MethodEED2Ev[_ZN3c1013optional_baseIN5torch3jit6MethodEED5Ev]+0x15): undefined reference to
vtable for torch::jit::Method'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function c10::intrusive_ptr<c10::TensorImpl, c10::UndefinedTensorImpl>::reset_()': hlg_decode.cc:(.text._ZN3c1013intrusive_ptrINS_10TensorImplENS_19UndefinedTensorImplEE6reset_Ev[_ZN3c1013intrusive_ptrINS_10TensorImplENS_19UndefinedTensorImplEE6reset_Ev]+0x6): undefined reference to
c10::UndefinedTensorImpl::_singleton'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function std::_MakeUniq<torch::autograd::AutogradMeta>::__single_object std::make_unique<torch::autograd::AutogradMeta, c10::TensorImpl*, bool&>(c10::TensorImpl*&&, bool&) [clone .isra.750] [clone .constprop.2163]': hlg_decode.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_.isra.750.constprop.2163[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x1e): undefined reference to
vtable for torch::autograd::AutogradMeta'
hlg_decode.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15singleobjectEDpOT0.isra.750.constprop.2163[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x33): undefined reference to `c10::UndefinedTensorImpl::_singleton'
hlg_decode.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15singleobjectEDpOT0.isra.750.constprop.2163[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x123): undefined reference to c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)' hlg_decode.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_.isra.750.constprop.2163[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x14b): undefined reference to
c10::detail::torchCheckFail(char const, char const, unsigned int, char const)'
hlg_decode.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15singleobjectEDpOT0.isra.750.constprop.2163[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x189): undefined reference to caffe2::TypeMeta::error_unsupported_typemeta(caffe2::TypeMeta)' hlg_decode.cc:(.text._ZSt11make_uniqueIN5torch8autograd12AutogradMetaEJPN3c1010TensorImplERbEENSt9_MakeUniqIT_E15__single_objectEDpOT0_.isra.750.constprop.2163[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x1fa): undefined reference to
c10::AutogradMetaInterface::~AutogradMetaInterface()'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function `torch::jit::Object::attr(std::cxx11::basic_string<char, std::char_traitsc10::ivalue::Object::type() const' hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1ab): undefined reference to
c10::ivalue::Object::type() const'
hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1b8): undefined reference to `c10::ClassType::findConstantSlot(std::cxx11::basic_string<char, std::char_traitsc10::ivalue::Object::type() const' hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x210): undefined reference to
c10::ClassType::getConstant(unsigned long) const'
hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x24b): undefined reference to `c10::detail::torchCheckFail(char const, char const, unsigned int, char const)'
hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x2c0): undefined reference to `c10::ivalue::Object::type() const'
hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x42a): undefined reference to c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
c10::IValue torch::jit::Object::run_method<at::Tensor&, c10::IValue&>(std::cxx11::basic_string<char, std::char_traitsvtable for torch::jit::Method' hlg_decode.cc:(.text._ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xe9): undefined reference to
c10::UndefinedTensorImpl::_singleton'
hlg_decode.cc:(.text._ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEDpOT[_ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEDpOT]+0x1d3): undefined reference to torch::jit::Method::operator()(std::vector<c10::IValue, std::allocator<c10::IValue> >, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, c10::IValue, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, c10::IValue> > > const&) const' hlg_decode.cc:(.text._ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x55e): undefined reference to
c10::detail::torchCheckFail(char const, char const, unsigned int, std::cxx11::basic_string<char, std::char_traitsc10::UndefinedTensorImpl::_singleton' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
torch::autograd::make_variable(at::Tensor, bool, bool)':
hlg_decode.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x10): undefined reference to c10::UndefinedTensorImpl::_singleton' hlg_decode.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0xe8): undefined reference to
c10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_deletec10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete<c10::AutogradMetaInterface> >)' hlg_decode.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x22f): undefined reference to
c10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_deletec10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete<c10::AutogradMetaInterface> >)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
torch::arange(c10::Scalar const&, c10::TensorOptions)':
hlg_decode.cc:(.text._ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE[_ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE]+0x4c): undefined reference to c10::impl::ExcludeDispatchKeyGuard::ExcludeDispatchKeyGuard(c10::DispatchKeySet)' hlg_decode.cc:(.text._ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE[_ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE]+0x117): undefined reference to
at::_ops::arange::call(c10::Scalar const&, c10::optionalc10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' hlg_decode.cc:(.text._ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE[_ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE]+0x17b): undefined reference to
caffe2::TypeMeta::error_unsupported_typemeta(caffe2::TypeMeta)'
hlg_decode.cc:(.text._ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE[_ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE]+0x1c7): undefined reference to c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
torch::from_blob(void*, c10::ArrayRefc10::impl::ExcludeDispatchKeyGuard::ExcludeDispatchKeyGuard(c10::DispatchKeySet)' hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x6b): undefined reference to
c10::impl::ExcludeDispatchKeyGuard::ExcludeDispatchKeyGuard(c10::DispatchKeySet)'
hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x120): undefined reference to at::TensorMaker::make_tensor()' hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x157): undefined reference to
c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()'
hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x15f): undefined reference to c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x16b): undefined reference to
c10::UndefinedTensorImpl::_singleton'
hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x231): undefined reference to c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x239): undefined reference to
c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function `c10::Dict<std::cxx11::basic_string<char, std::char_traitsc10::StringType::get()' hlg_decode.cc:(.text._ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorEEC2Ev[_ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorEEC5Ev]+0x35): undefined reference to
c10::TensorType::get()'
CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function std::pair<ska_ordered::detailv3::sherwood_v3_table<std::pair<c10::IValue, c10::IValue>, c10::IValue, c10::detail::DictKeyHash, ska_ordered::detailv3::KeyOrValueHasher<c10::IValue, std::pair<c10::IValue, c10::IValue>, c10::detail::DictKeyHash>, c10::detail::DictKeyEqualTo, ska_ordered::detailv3::KeyOrValueEquality<c10::IValue, std::pair<c10::IValue, c10::IValue>, c10::detail::DictKeyEqualTo>, std::allocator<std::pair<c10::IValue, c10::IValue> >, std::allocator<ska_ordered::detailv3::sherwood_v3_entry<std::pair<c10::IValue, c10::IValue> > > >::templated_iterator<std::pair<c10::IValue, c10::IValue> >, bool> ska_ordered::detailv3::sherwood_v3_table<std::pair<c10::IValue, c10::IValue>, c10::IValue, c10::detail::DictKeyHash, ska_ordered::detailv3::KeyOrValueHasher<c10::IValue, std::pair<c10::IValue, c10::IValue>, c10::detail::DictKeyHash>, c10::detail::DictKeyEqualTo, ska_ordered::detailv3::KeyOrValueEquality<c10::IValue, std::pair<c10::IValue, c10::IValue>, c10::detail::DictKeyEqualTo>, std::allocator<std::pair<c10::IValue, c10::IValue> >, std::allocator<ska_ordered::detailv3::sherwood_v3_entry<std::pair<c10::IValue, c10::IValue> > > >::emplace<std::pair<c10::IValue, c10::IValue>>(std::pair<c10::IValue, c10::IValue>&&)': hlg_decode.cc:(.text._ZN11ska_ordered8detailv317sherwood_v3_tableISt4pairIN3c106IValueES4_ES4_NS3_6detail11DictKeyHashENS0_16KeyOrValueHasherIS4_S5_S7_EENS6_14DictKeyEqualToENS0_18KeyOrValueEqualityIS4_S5_SA_EESaIS5_ESaINS0_17sherwood_v3_entryIS5_EEEE7emplaceIS5_JEEES2_INSH_18templated_iteratorIS5_EEbEOT_DpOT0_[_ZN11ska_ordered8detailv317sherwood_v3_tableISt4pairIN3c106IValueES4_ES4_NS3_6detail11DictKeyHashENS0_16KeyOrValueHasherIS4_S5_S7_EENS6_14DictKeyEqualToENS0_18KeyOrValueEqualityIS4_S5_SA_EESaIS5_ESaINS0_17sherwood_v3_entryIS5_EEEE7emplaceIS5_JEEES2_INSH_18templated_iteratorIS5_EEbEOT_DpOT0_]+0x51): undefined reference to
c10::_fastEqualsForContainer(c10::IValue const&, c10::IValue const&)'
hlg_decode.cc:(.text._ZN11ska_ordered8detailv317sherwood_v3_tableISt4pairIN3c106IValueES4_ES4_NS3_6detail11DictKeyHashENS0_16KeyOrValueHasherIS4_S5_S7_EENS6_14DictKeyEqualToENS0_18KeyOrValueEqualityIS4_S5_SA_EESaIS5_ESaINS0_17sherwood_v3_entryIS5_EEEE7emplaceIS5_JEEES2_INSH_18templated_iteratorIS5_EEbEOTDpOT0[_ZN11ska_ordered8detailv317sherwood_v3_tableISt4pairIN3c106IValueES4_ES4_NS3_6detail11DictKeyHashENS0_16KeyOrValueHasherIS4_S5_S7_EENS6_14DictKeyEqualToENS0_18KeyOrValueEqualityIS4_S5_SA_EESaIS5_ESaINS0_17sherwood_v3_entryIS5_EEEE7emplaceIS5_JEEES2_INSH_18templated_iteratorIS5_EEbEOTDpOT0]+0x7c): undefined reference to c10::IValue::is(c10::IValue const&) const' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
main':
hlg_decode.cc:(.text.startup+0x3d): undefined reference to at::set_num_threads(int)' hlg_decode.cc:(.text.startup+0x47): undefined reference to
at::set_num_interop_threads(int)'
hlg_decode.cc:(.text.startup+0x4c): undefined reference to c10::GradMode::is_enabled()' hlg_decode.cc:(.text.startup+0x59): undefined reference to
c10::GradMode::set_enabled(bool)'
hlg_decode.cc:(.text.startup+0x70): undefined reference to c10::SetUsageMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' hlg_decode.cc:(.text.startup+0x98): undefined reference to
c10::ParseCommandLineFlags(int*, char**)'
hlg_decode.cc:(.text.startup+0x4a7): undefined reference to at::_ops::to_dtype_layout::call(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, bool, bool, c10::optional<c10::MemoryFormat>)' hlg_decode.cc:(.text.startup+0x4b5): undefined reference to
c10::UndefinedTensorImpl::_singleton'
hlg_decode.cc:(.text.startup+0x623): undefined reference to c10::Device::Device(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' hlg_decode.cc:(.text.startup+0x78b): undefined reference to
at::_ops::pad_sequence::call(c10::ArrayReftorch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<c10::Device>, bool)' hlg_decode.cc:(.text.startup+0x812): undefined reference to
torch::jit::Module::train(bool)'
hlg_decode.cc:(.text.startup+0x823): undefined reference to torch::jit::Module::to(c10::Device, bool)' hlg_decode.cc:(.text.startup+0x912): undefined reference to
c10::UndefinedTensorImpl::_singleton'
hlg_decode.cc:(.text.startup+0x9b0): undefined reference to c10::impl::ExcludeDispatchKeyGuard::ExcludeDispatchKeyGuard(c10::DispatchKeySet)' hlg_decode.cc:(.text.startup+0xa27): undefined reference to
at::_ops::zeros::call(c10::ArrayRefc10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' hlg_decode.cc:(.text.startup+0xb69): undefined reference to
at::_ops::to_dtype::call(at::Tensor const&, c10::ScalarType, bool, bool, c10::optionalc10::UndefinedTensorImpl::_singleton' hlg_decode.cc:(.text.startup+0x161c): undefined reference to
c10::GradMode::set_enabled(bool)'
hlg_decode.cc:(.text.startup+0x1990): undefined reference to `c10::detail::torchCheckFail(char constc10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' hlg_decode.cc:(.text.startup+0x1a29): undefined reference to
c10::IValue::reportToTensorTypeError() const'
hlg_decode.cc:(.text.startup+0x1add): undefined reference to c10::GradMode::set_enabled(bool)' hlg_decode.cc:(.text.startup+0x1bb1): undefined reference to
c10::IValue::reportToTensorTypeError() const'
hlg_decode.cc:(.text.startup+0x1d6e): undefined reference to c10::UsageMessage()' hlg_decode.cc:(.text.startup+0x1ea0): undefined reference to
c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()'
hlg_decode.cc:(.text.startup+0x1ee8): undefined reference to c10::UndefinedTensorImpl::_singleton' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function
static_initialization_and_destruction_0(int, int) [clone .constprop.2158]':
hlg_decode.cc:(.text.startup+0x22bf): undefined reference to c10::C10FlagsRegistry[abi:cxx11]()' hlg_decode.cc:(.text.startup+0x238a): undefined reference to
c10::C10FlagsRegistry[abi:cxx11]()'
hlg_decode.cc:(.text.startup+0x2444): undefined reference to c10::C10FlagsRegistry[abi:cxx11]()' hlg_decode.cc:(.text.startup+0x24fe): undefined reference to
c10::C10FlagsRegistry[abi:cxx11]()'
hlg_decode.cc:(.text.startup+0x258f): undefined reference to c10::C10FlagsRegistry[abi:cxx11]()' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o:hlg_decode.cc:(.text.startup+0x2620): more undefined references to
c10::C10FlagsRegistry[abi:cxx11]()' follow
../../../lib/libk2context.so: undefined reference to c10::GetAllocator(c10::DeviceType const&)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::empty_like::call(at::Tensor const&, c10::optionalat::_ops::floor_divide_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference to
torch::detail::class_base::class_base(std::cxx11::basic_string<char, std::char_traitsat::_ops::mm::call(at::Tensor const&, at::Tensor const&)' ../../../lib/libk2_torch.so: undefined reference to
caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::shared_ptrat::_ops::div_Scalar_mode::call(at::Tensor const&, c10::Scalar const&, c10::optional<c10::basic_string_view<char> >)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::log_softmax_int::call(at::Tensor const&, long, c10::optionalc10::ivalue::checkCustomClassType(c10::ClassType const*, c10::Type const*)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::mul_Tensor::call(at::Tensor const&, at::Tensor const&)'
../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::resize_::call(at::Tensor const&, c10::ArrayRef<c10::SymInt>, c10::optional<c10::MemoryFormat>)' ../../../lib/libk2_torch.so: undefined reference to
c10::detail::torchInternalAssertFail(char const, char const, unsigned int, char const, char const)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::stack::call(c10::ArrayRef<at::Tensor>, long)' ../../../lib/libk2_torch.so: undefined reference to
c10::NoneType::get()'
../../../lib/libk2_torch.so: undefined reference to at::_ops::argmax::call(at::Tensor const&, c10::optional<long>, bool)' ../../../lib/libk2_torch.so: undefined reference to
c10::ClassType::addMethod(torch::jit::Function)'
../../../lib/libk2_torch.so: undefined reference to `caffe2::serialize::FileAdapter::read(unsigned long, void, unsigned long, char const*) const'
../../../lib/libk2_torch.so: undefined reference to torch::jit::getGraphExecutorOptimize()' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::addat::Tensor::index(std::initializer_list<at::indexing::TensorIndex>) const' ../../../lib/libk2_torch.so: undefined reference to
c10::ivalue::Object::resizeObject(unsigned long)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::empty_memory_format::call(c10::ArrayRef<c10::SymInt>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::randn_like::call(at::Tensor const&, c10::optionalc10::get_default_dtype()' ../../../lib/libk2_torch.so: undefined reference to
c10::SymInt::operator<(long) const'
../../../lib/libkaldifeat_core.so: undefined reference to at::internal::set_thread_num(int)' ../../../lib/libk2_torch.so: undefined reference to
c10::getCustomClassTypeImpl(std::type_index const&)'
../../../lib/libk2_torch.so: undefined reference to c10::Symbol::toUnqualString() const' ../../../lib/libk2context.so: undefined reference to
c10::TensorImpl::throw_storage_access_error() const'
../../../lib/libk2_torch.so: undefined reference to at::Tensor::index_put_(std::initializer_list<at::indexing::TensorIndex>, at::Tensor const&)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::as_strided::call(at::Tensor const&, c10::ArrayReftorch::jit::setGraphExecutorOptimize(bool)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::flip::call(at::Tensor const&, c10::ArrayReftorch::jit::readArchiveAndTensors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<std::function<c10::StrongTypePtr (c10::QualifiedName const&)> >, c10::optional<std::function<c10::intrusive_ptr<c10::ivalue::Object, c10::detail::intrusive_target_default_null_type<c10::ivalue::Object> > (c10::StrongTypePtr, c10::IValue)> >, c10::optional<c10::Device>, caffe2::serialize::PyTorchStreamReader&, c10::Type::SingletonOrSharedTypePtr<c10::Type> (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), std::shared_ptr<torch::jit::DeserializationStorageContext>)' ../../../lib/libk2_torch.so: undefined reference to
torch::jit::SourceImporter::SourceImporter(std::shared_ptrtorch::registerCustomClass(std::shared_ptr<c10::ClassType>)' ../../../lib/libk2_torch.so: undefined reference to
c10::SymBool::guard_bool(char const, long) const'
../../../lib/libk2_torch.so: undefined reference to at::_ops::sort::call(at::Tensor const&, long, bool)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::roll::call(at::Tensor const&, c10::ArrayRefat::_ops::div_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference to
c10::operator<<(std::ostream&, c10::IValue const&)'
../../../lib/libk2_torch.so: undefined reference to caffe2::serialize::FileAdapter::FileAdapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' ../../../lib/libk2_torch.so: undefined reference to
caffe2::TypeMeta::typeMetaDatas()'
../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::unsqueeze_::call(at::Tensor&, long)' ../../../lib/libk2_torch.so: undefined reference to
c10::IValue::toModule() const'
../../../lib/libk2_torch.so: undefined reference to torch::jit::SourceImporter::loadType(c10::QualifiedName const&) const' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::fill__Scalar::call(at::Tensor&, c10::Scalar const&)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::mul_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::where_self::call(at::Tensor const&, at::Tensor const&, at::Tensor const&)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::add_Tensor::call(at::Tensor const&, at::Tensor const&, c10::Scalar const&)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::ops::t::call(at::Tensor&)'
../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::log10::call(at::Tensor const&)' ../../../lib/libk2_fbank.so: undefined reference to
at::_ops::mean_dim::call(at::Tensor const&, c10::OptionalArrayRefat::_ops::max::call(at::Tensor const&)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::scalar_tensor::call(c10::Scalar const&, c10::optionalc10::AnyType::get()' ../../../lib/libk2_torch.so: undefined reference to
at::ops::zero::call(at::Tensor&)'
../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::sub_Scalar::call(at::Tensor const&, c10::Scalar const&, c10::Scalar const&)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::maximum::call(at::Tensor const&, at::Tensor const&)'
../../../lib/libk2_torch.so: undefined reference to c10::ivalue::Future::extractStorages(c10::IValue const&)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::remainder_Scalar::call(at::Tensor const&, c10::Scalar const&)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::sub_Tensor::call(at::Tensor const&, at::Tensor const&, c10::Scalar const&)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::fft_rfft::call(at::Tensor const&, c10::optionalat::_ops::_pack_padded_sequence::call(at::Tensor const&, at::Tensor const&, bool)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::select_int::call(at::Tensor const&, long, c10::SymInt)'
../../../lib/libk2_torch.so: undefined reference to `floatshort* at::TensorBase::data_ptr<short>() const' ../../../lib/libk2_torch.so: undefined reference to
c10::DeviceTypeName[abi:cxx11](c10::DeviceType, bool)'
../../../lib/libk2_torch.so: undefined reference to c10::SymInt::operator!=(long) const' ../../../lib/libkaldifeat_core.so: undefined reference to
at::print(std::ostream&, at::Tensor const&, long)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::slice_Tensor::call(at::Tensor const&, long, c10::optional<c10::SymInt>, c10::optional<c10::SymInt>, c10::SymInt)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::squeeze_dim::call(at::Tensor const&, long)'
../../../lib/libk2_torch.so: undefined reference to c10::ClassType::findMethod(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ../../../lib/libk2_torch.so: undefined reference to
c10::impl::device_guard_impl_registry'
../../../lib/libk2_torch.so: undefined reference to at::_ops::cat::call(c10::IListRef<at::Tensor> const&, long)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::abs::call(at::Tensor const&)'
../../../lib/libk2_fbank.so: undefined reference to at::_ops::clamp_min::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::get_thread_num()'
../../../lib/libk2_torch.so: undefined reference to c10::operator<<(std::ostream&, c10::DeviceType)' ../../../lib/libk2_torch.so: undefined reference to
c10::Error::Error(c10::SourceLocation, std::cxx11::basic_string<char, std::char_traitsat::_ops::eq_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference to
long* at::TensorBase::data_ptrcaffe2::serialize::PyTorchStreamReader::~PyTorchStreamReader()' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::scatterat::_ops::topk::call(at::Tensor const&, long, long, bool, bool)' ../../../lib/libk2_torch.so: undefined reference to
c10::StrongTypePtr::StrongTypePtr(std::shared_ptrat::_ops::pow_Tensor_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_fbank.so: undefined reference to
at::_ops::sum_dim_IntList::call(at::Tensor const&, c10::OptionalArrayRefat::TensorBase::__dispatch_contiguous(c10::MemoryFormat) const' ../../../lib/libk2_fbank.so: undefined reference to
at::_ops::log::call(at::Tensor const&)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::copy_::call(at::Tensor&, at::Tensor const&, bool)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::arange_start::call(c10::Scalar const&, c10::Scalar const&, c10::optionalc10::ClassType::getMethod(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ../../../lib/libk2_torch.so: undefined reference to
c10::IValue::TagTypeat::_ops::split_with_sizes::call(at::Tensor const&, c10::ArrayRef<c10::SymInt>, long)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::t::call(at::Tensor const&)'
../../../lib/libk2_fbank.so: undefined reference to at::_ops::_pad_enum::call(at::Tensor const&, c10::ArrayRef<c10::SymInt>, long, c10::optional<double>)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::index_select::call(at::Tensor const&, long, at::Tensor const&)'
../../../lib/libk2_torch.so: undefined reference to torch::jit::SourceImporter::~SourceImporter()' ../../../lib/libk2_fbank.so: undefined reference to
torch::nn::functional::PadFuncOptions::PadFuncOptions(std::vector<long, std::allocatorat::_ops::unsqueeze::call(at::Tensor const&, long)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::full::call(c10::ArrayRefcaffe2::serialize::FileAdapter::~FileAdapter()' ../../../lib/libk2_torch.so: undefined reference to
torch::registerCustomClassMethod(std::unique_ptr<torch::jit::Function, std::default_deletec10::IValue::isIntList() const' ../../../lib/libk2_torch.so: undefined reference to
long c10::detail::maybe_wrap_dim_slowat::_ops::add_Scalar::call(at::Tensor const&, c10::Scalar const&, c10::Scalar const&)' ../../../lib/libkaldifeat_core.so: undefined reference to
at::_ops::mul__Scalar::call(at::Tensor&, c10::Scalar const&)'
../../../lib/libk2_torch.so: undefined reference to at::_ops::clone::call(at::Tensor const&, c10::optional<c10::MemoryFormat>)' ../../../lib/libk2_torch.so: undefined reference to
at::_ops::reshape::call(at::Tensor const&, c10::ArrayRef
Is there any resource that has commands to run installation from source for cpu ?
Thanks for the suggestion @csukuangfj ,I changed cu files and rebuild from start ,its taking less time to install from source on cpu.
Would you mind posting all of the logs, not partial logs.
Is there any resource that has commands to run installation from source for CPU ?
It is documented clearly. Please read the doc by yourself.
https://k2-fsa.github.io/k2/installation/from_source.html
You can pass the option -DK2_WITH_CUDA=OFF to cmake to build a CPU only version of k2. In that case, you have to install a CPU version of PyTorch; otherwise, you will get a CMake configuration error, saying that cuDNN cannot be found.
By the way, if you change any code and get errors after the change, please also show
git diff
Otherwise, only you know what has changed and we cannot help you in this case.
I actually added few print statements to get intermediate outputs.I guess changing build will cause the problems ,so i changed cu files and removed the build and again compiled build with modified cu files.
So have you managed to build k2 for cpu-only?
Yes.Actually the problem is if i make changes ,i am not sure how to reflect those changes in k2 library.So i am doing those changes in build,as you have suggested i changed cu files and removed the build,again compiled the build and installed k2.
I have installed k2 from source in cpu .It has created new directory where there are cc files corresponding to cu files.If i make some changes in cc files .How to reflect these changes. I have tried these methods.I have made few changes in rnnt_decode.cc in build/k2/csrc/ and run make command in the same csrc folder.And i ran python3 setup.py install in main k2 directory.And i am facing few errors.Any solution?