k2-fsa / k2

FSA/FST algorithms, differentiable, with PyTorch compatibility.
https://k2-fsa.github.io/k2
Apache License 2.0
1.11k stars 213 forks source link

Reinstalling from source in cpu #1301

Closed Manjunath-mlp closed 1 month ago

Manjunath-mlp commented 1 month ago

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?

csukuangfj commented 1 month ago
  1. Please never change files in the build directory

  2. Change the .cu files instead even if you want only a cpu build.

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

Manjunath-mlp commented 1 month ago

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 tobool c10::C10FlagParser::Parse(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function `std::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_sample_rate>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x88): undefined reference to bool 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 functionstd::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_max_activate_states>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0xe8): undefined reference to bool 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 functionstd::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_min_activate_states>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x148): undefined reference to bool 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 functionstd::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_frame_length_ms>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x1a8): undefined reference to bool 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 functionstd::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_frame_shift_ms>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x208): undefined reference to bool 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 functionstd::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_output_beam>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x268): undefined reference to bool 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 functionstd::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_search_beam>(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x2c8): undefined reference to `bool c10::C10FlagParser::Parse(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, double)' 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_word_table>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': hlg_decode.cc:(.text+0x328): undefined reference tobool c10::C10FlagParser::Parse<std::cxx11::basic_string<char, std::char_traits, std::allocator > >(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)' 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_hlg>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': hlg_decode.cc:(.text+0x388): undefined reference tobool c10::C10FlagParser::Parse<std::cxx11::basic_string<char, std::char_traits, std::allocator > >(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator >*)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function `std::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_nn_model>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x3e8): undefined reference to bool 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 functionstd::unique_ptr<c10::C10FlagParser, std::default_delete > c10::Registerer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::unique_ptr<c10::C10FlagParser, std::default_delete >, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>::DefaultCreator<c10::(anonymous namespace)::C10FlagParser_use_gpu>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': hlg_decode.cc:(.text+0x448): undefined reference to bool 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 functionc10::fromIntArrayRefSlow(c10::ArrayRef)': hlg_decode.cc:(.text._ZN3c1019fromIntArrayRefSlowENS_8ArrayRefIlEE[_ZN3c1019fromIntArrayRefSlowENS_8ArrayRefIlEE]+0xac): undefined reference to `c10::detail::torchCheckFail(char const, char const, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function c10::IValue::destroy()': hlg_decode.cc:(.text._ZN3c106IValue7destroyEv[_ZN3c106IValue7destroyEv]+0x29): undefined reference toc10::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 toc10::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 toc10::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 toc10::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 toc10::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 tovtable 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 toc10::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 tovtable 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 toc10::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 toc10::AutogradMetaInterface::~AutogradMetaInterface()' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function `torch::jit::Object::attr(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const': hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x52): undefined reference to c10::ivalue::Object::type() const' hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1ab): undefined reference toc10::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_traits, std::allocator > const&) const' hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1ff): undefined reference to c10::ivalue::Object::type() const' hlg_decode.cc:(.text._ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5torch3jit6Object4attrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x210): undefined reference toc10::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 functionc10::IValue torch::jit::Object::run_method<at::Tensor&, c10::IValue&>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, at::Tensor&, c10::IValue&)': hlg_decode.cc:(.text._ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEDpOT[_ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEDpOT]+0x3e): undefined reference to `torch::jit::Object::find_method(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' hlg_decode.cc:(.text._ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEDpOT[_ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEDpOT]+0x85): undefined reference to vtable for torch::jit::Method' hlg_decode.cc:(.text._ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5torch3jit6Object10run_methodIJRN2at6TensorERN3c106IValueEEEES7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xe9): undefined reference toc10::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 toc10::detail::torchCheckFail(char const, char const, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function `std::pair<c10::IValue, c10::IValue>::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, at::Tensor, true>(std::cxx11::basic_string<char, std::char_traits, std::allocator >&&, at::Tensor&&)': hlg_decode.cc:(.text._ZNSt4pairIN3c106IValueES1_EC2INSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorELb1EEEOTOT0[_ZNSt4pairIN3c106IValueES1_EC5INSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorELb1EEEOTOT0]+0x9d): undefined reference to `c10::ivalue::ConstantString::create(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)' hlg_decode.cc:(.text._ZNSt4pairIN3c106IValueES1_EC2INSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorELb1EEEOTOT0[_ZNSt4pairIN3c106IValueES1_EC5INSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorELb1EEEOTOT0]+0xb2): undefined reference to c10::UndefinedTensorImpl::_singleton' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In functiontorch::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 toc10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete >)' hlg_decode.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x1a7): undefined reference to c10::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 toc10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete >)' hlg_decode.cc:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x275): undefined reference to c10::TensorImpl::set_autograd_meta(std::unique_ptr<c10::AutogradMetaInterface, std::default_delete<c10::AutogradMetaInterface> >)' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In functiontorch::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 toat::_ops::arange::call(c10::Scalar const&, c10::optional, c10::optional, c10::optional, c10::optional)' hlg_decode.cc:(.text._ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE[_ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE]+0x139): undefined reference to c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' hlg_decode.cc:(.text._ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE[_ZN5torch6arangeERKN3c106ScalarENS0_13TensorOptionsE]+0x17b): undefined reference tocaffe2::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 functiontorch::from_blob(void*, c10::ArrayRef, c10::TensorOptions const&)': hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x51): undefined reference to c10::impl::ExcludeDispatchKeyGuard::ExcludeDispatchKeyGuard(c10::DispatchKeySet)' hlg_decode.cc:(.text._ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE[_ZN5torch9from_blobEPvN3c108ArrayRefIlEERKNS1_13TensorOptionsE]+0x6b): undefined reference toc10::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 toc10::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 toc10::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 toc10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In function `c10::Dict<std::cxx11::basic_string<char, std::char_traits, std::allocator >, at::Tensor>::Dict()': hlg_decode.cc:(.text._ZN3c104DictINSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorEEC2Ev[_ZN3c104DictINSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorEEC5Ev]+0x22): undefined reference to c10::StringType::get()' hlg_decode.cc:(.text._ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorEEC2Ev[_ZN3c104DictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2at6TensorEEC5Ev]+0x35): undefined reference toc10::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 toc10::_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 functionmain': hlg_decode.cc:(.text.startup+0x3d): undefined reference to at::set_num_threads(int)' hlg_decode.cc:(.text.startup+0x47): undefined reference toat::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 toc10::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 toc10::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 toc10::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 toat::_ops::pad_sequence::call(c10::ArrayRef, bool, double)' hlg_decode.cc:(.text.startup+0x808): undefined reference to torch::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 totorch::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 toc10::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 toat::_ops::zeros::call(c10::ArrayRef, c10::optional, c10::optional, c10::optional, c10::optional)' hlg_decode.cc:(.text.startup+0xa4f): undefined reference to c10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' hlg_decode.cc:(.text.startup+0xb69): undefined reference toat::_ops::to_dtype::call(at::Tensor const&, c10::ScalarType, bool, bool, c10::optional)' hlg_decode.cc:(.text.startup+0x1031): undefined reference to c10::UndefinedTensorImpl::_singleton' hlg_decode.cc:(.text.startup+0x161c): undefined reference toc10::GradMode::set_enabled(bool)' hlg_decode.cc:(.text.startup+0x1990): undefined reference to `c10::detail::torchCheckFail(char const, char const, unsigned int, char const)' hlg_decode.cc:(.text.startup+0x19e8): undefined reference to c10::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 toc10::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 toc10::IValue::reportToTensorTypeError() const' hlg_decode.cc:(.text.startup+0x1d6e): undefined reference to c10::UsageMessage()' hlg_decode.cc:(.text.startup+0x1ea0): undefined reference toc10::impl::ExcludeDispatchKeyGuard::~ExcludeDispatchKeyGuard()' hlg_decode.cc:(.text.startup+0x1ee8): undefined reference to c10::UndefinedTensorImpl::_singleton' CMakeFiles/hlg_decode.dir/hlg_decode.cc.o: In functionstatic_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 toc10::C10FlagsRegistry[abi:cxx11]()' hlg_decode.cc:(.text.startup+0x2444): undefined reference to c10::C10FlagsRegistry[abi:cxx11]()' hlg_decode.cc:(.text.startup+0x24fe): undefined reference toc10::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 toc10::C10FlagsRegistry[abi:cxx11]()' follow ../../../lib/libk2context.so: undefined reference to c10::GetAllocator(c10::DeviceType const&)' ../../../lib/libk2_torch.so: undefined reference toat::_ops::empty_like::call(at::Tensor const&, c10::optional, c10::optional, c10::optional, c10::optional, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to `torch::jit::ScriptTypeParser::parseType(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' ../../../lib/libk2_torch.so: undefined reference to at::_ops::floor_divide_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference totorch::detail::class_base::class_base(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::type_info const&, std::type_info const&)' ../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::mm::call(at::Tensor const&, at::Tensor const&)' ../../../lib/libk2_torch.so: undefined reference tocaffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::shared_ptr)' ../../../lib/libk2_torch.so: undefined reference to at::_ops::div_Scalar_mode::call(at::Tensor const&, c10::Scalar const&, c10::optional<c10::basic_string_view<char> >)' ../../../lib/libk2_torch.so: undefined reference toat::_ops::log_softmax_int::call(at::Tensor const&, long, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to c10::ivalue::checkCustomClassType(c10::ClassType const*, c10::Type const*)' ../../../lib/libkaldifeat_core.so: undefined reference toat::_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 toc10::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 toc10::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 toc10::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 toat::_ops::addTensor::call(at::Tensor&, at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference to at::Tensor::index(std::initializer_list<at::indexing::TensorIndex>) const' ../../../lib/libk2_torch.so: undefined reference toc10::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 toat::_ops::randn_like::call(at::Tensor const&, c10::optional, c10::optional, c10::optional, c10::optional, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to c10::get_default_dtype()' ../../../lib/libk2_torch.so: undefined reference toc10::SymInt::operator<(long) const' ../../../lib/libkaldifeat_core.so: undefined reference to at::internal::set_thread_num(int)' ../../../lib/libk2_torch.so: undefined reference toc10::getCustomClassTypeImpl(std::type_index const&)' ../../../lib/libk2_torch.so: undefined reference to c10::Symbol::toUnqualString() const' ../../../lib/libk2context.so: undefined reference toc10::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 toat::_ops::as_strided::call(at::Tensor const&, c10::ArrayRef, c10::ArrayRef, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to torch::jit::setGraphExecutorOptimize(bool)' ../../../lib/libkaldifeat_core.so: undefined reference toat::_ops::flip::call(at::Tensor const&, c10::ArrayRef)' ../../../lib/libk2_torch.so: undefined reference to torch::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 totorch::jit::SourceImporter::SourceImporter(std::shared_ptr, std::vector<c10::IValue, std::allocator > const, std::function<std::shared_ptr (std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)>, unsigned long)' ../../../lib/libk2_torch.so: undefined reference to `c10::detail::infer_schema::make_function_schema(std::cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, c10::ArrayRef, c10::ArrayRef)' ../../../lib/libk2_torch.so: undefined reference to `int at::TensorBase::data_ptr() const' ../../../lib/libk2_torch.so: undefined reference to torch::registerCustomClass(std::shared_ptr<c10::ClassType>)' ../../../lib/libk2_torch.so: undefined reference toc10::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 toat::_ops::roll::call(at::Tensor const&, c10::ArrayRef, c10::ArrayRef)' ../../../lib/libk2_torch.so: undefined reference to at::_ops::div_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference toc10::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 tocaffe2::TypeMeta::typeMetaDatas()' ../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::unsqueeze_::call(at::Tensor&, long)' ../../../lib/libk2_torch.so: undefined reference toc10::IValue::toModule() const' ../../../lib/libk2_torch.so: undefined reference to torch::jit::SourceImporter::loadType(c10::QualifiedName const&) const' ../../../lib/libk2_torch.so: undefined reference toat::_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 toat::_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 toat::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 toat::_ops::mean_dim::call(at::Tensor const&, c10::OptionalArrayRef, bool, c10::optional)' ../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::max::call(at::Tensor const&)' ../../../lib/libk2_torch.so: undefined reference toat::_ops::scalar_tensor::call(c10::Scalar const&, c10::optional, c10::optional, c10::optional, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to c10::AnyType::get()' ../../../lib/libk2_torch.so: undefined reference toat::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 toat::_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 toat::_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 toat::_ops::fft_rfft::call(at::Tensor const&, c10::optional, long, c10::optional<c10::basic_string_view >)' ../../../lib/libk2_torch.so: undefined reference to at::_ops::_pack_padded_sequence::call(at::Tensor const&, at::Tensor const&, bool)' ../../../lib/libk2_torch.so: undefined reference toat::_ops::select_int::call(at::Tensor const&, long, c10::SymInt)' ../../../lib/libk2_torch.so: undefined reference to `float at::TensorBase::data_ptr() const' ../../../lib/libk2_torch.so: undefined reference to short* at::TensorBase::data_ptr<short>() const' ../../../lib/libk2_torch.so: undefined reference toc10::DeviceTypeName[abi:cxx11](c10::DeviceType, bool)' ../../../lib/libk2_torch.so: undefined reference to c10::SymInt::operator!=(long) const' ../../../lib/libkaldifeat_core.so: undefined reference toat::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 toat::_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 toc10::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 toat::_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 toat::get_thread_num()' ../../../lib/libk2_torch.so: undefined reference to c10::operator<<(std::ostream&, c10::DeviceType)' ../../../lib/libk2_torch.so: undefined reference toc10::Error::Error(c10::SourceLocation, std::cxx11::basic_string<char, std::char_traits, std::allocator >)' ../../../lib/libk2_torch.so: undefined reference to at::_ops::eq_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_torch.so: undefined reference tolong* at::TensorBase::data_ptr() const' ../../../lib/libk2_torch.so: undefined reference to caffe2::serialize::PyTorchStreamReader::~PyTorchStreamReader()' ../../../lib/libk2_torch.so: undefined reference toat::_ops::scattersrc::call(at::Tensor&, long, at::Tensor const&, at::Tensor const&)' ../../../lib/libk2_torch.so: undefined reference to at::_ops::topk::call(at::Tensor const&, long, long, bool, bool)' ../../../lib/libk2_torch.so: undefined reference toc10::StrongTypePtr::StrongTypePtr(std::shared_ptr, c10::Type::SingletonOrSharedTypePtr)' ../../../lib/libk2_fbank.so: undefined reference to at::_ops::pow_Tensor_Scalar::call(at::Tensor const&, c10::Scalar const&)' ../../../lib/libk2_fbank.so: undefined reference toat::_ops::sum_dim_IntList::call(at::Tensor const&, c10::OptionalArrayRef, bool, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to at::TensorBase::__dispatch_contiguous(c10::MemoryFormat) const' ../../../lib/libk2_fbank.so: undefined reference toat::_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 toat::_ops::arange_start::call(c10::Scalar const&, c10::Scalar const&, c10::optional, c10::optional, c10::optional, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to c10::ClassType::getMethod(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ../../../lib/libk2_torch.so: undefined reference toc10::IValue::TagType::get(c10::IValue const&)' ../../../lib/libk2_fbank.so: undefined reference to at::_ops::split_with_sizes::call(at::Tensor const&, c10::ArrayRef<c10::SymInt>, long)' ../../../lib/libkaldifeat_core.so: undefined reference toat::_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 toat::_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 totorch::nn::functional::PadFuncOptions::PadFuncOptions(std::vector<long, std::allocator >)' ../../../lib/libk2_torch.so: undefined reference to at::_ops::unsqueeze::call(at::Tensor const&, long)' ../../../lib/libk2_torch.so: undefined reference toat::_ops::full::call(c10::ArrayRef, c10::Scalar const&, c10::optional, c10::optional, c10::optional, c10::optional)' ../../../lib/libk2_torch.so: undefined reference to caffe2::serialize::FileAdapter::~FileAdapter()' ../../../lib/libk2_torch.so: undefined reference totorch::registerCustomClassMethod(std::unique_ptr<torch::jit::Function, std::default_delete >)' ../../../lib/libk2_torch.so: undefined reference to c10::IValue::isIntList() const' ../../../lib/libk2_torch.so: undefined reference tolong c10::detail::maybe_wrap_dim_slow(long, long, bool)' ../../../lib/libkaldifeat_core.so: undefined reference to at::_ops::add_Scalar::call(at::Tensor const&, c10::Scalar const&, c10::Scalar const&)' ../../../lib/libkaldifeat_core.so: undefined reference toat::_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 toat::_ops::reshape::call(at::Tensor const&, c10::ArrayRef)' collect2: error: ld returned 1 exit status k2/torch/bin/CMakeFiles/hlg_decode.dir/build.make:108: recipe for target 'bin/hlg_decode' failed make[2]: [bin/hlg_decode] Error 1 CMakeFiles/Makefile2:672: recipe for target 'k2/torch/bin/CMakeFiles/hlg_decode.dir/all' failed make[1]: [k2/torch/bin/CMakeFiles/hlg_decode.dir/all] Error 2

Manjunath-mlp commented 1 month ago

Is there any resource that has commands to run installation from source for cpu ?

Manjunath-mlp commented 1 month ago

Thanks for the suggestion @csukuangfj ,I changed cu files and rebuild from start ,its taking less time to install from source on cpu.

csukuangfj commented 1 month ago

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.

csukuangfj commented 1 month ago

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.

Manjunath-mlp commented 1 month ago

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.

csukuangfj commented 1 month ago

So have you managed to build k2 for cpu-only?

Manjunath-mlp commented 1 month ago

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.