Skip to content
New issue

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

Is kaldi threadsafe when CUDA is enabled? #1872

Closed
chandlerz opened this issue Sep 6, 2017 · 1 comment
Closed

Is kaldi threadsafe when CUDA is enabled? #1872

chandlerz opened this issue Sep 6, 2017 · 1 comment

Comments

@chandlerz
Copy link

chandlerz commented Sep 6, 2017

As the title, is kaldi threadsafe when CUDA is enabled?
I want to use kaldi for speech inference with multi CPU threads, but it crashes with following error and backtrace.

It runs normal with a single CPU thread or multi CPU threads without CUDA. Any suggestion to fix the issue?
Thanks!


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff94ff9700 (LWP 26231)]
0x0000000000689458 in std::_Hashtable<void*, std::pair<void* const, kaldi::CuMemoryAllocator::UsedMemoryElement>, std::allocator<std::pair<void* const, kaldi::CuMemoryAllocator::UsedMemoryElement> >, std::__detail::_Select1st, std::equal_to<void*>, kaldi::CuMemoryAllocator::PointerHasher, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, void* const&, unsigned long) const [clone .isra.163] ()
(gdb) backtrace
#0 0x0000000000689458 in std::_Hashtable<void*, std::pair<void* const, kaldi::CuMemoryAllocator::UsedMemoryElement>, std::allocator<std::pair<void* const, kaldi::CuMemoryAllocator::UsedMemoryElement> >, std::__detail::_Select1st, std::equal_to<void*>, kaldi::CuMemoryAllocator::PointerHasher, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, void* const&, unsigned long) const [clone .isra.163] ()
#1 0x000000000068adad in kaldi::CuMemoryAllocator::Free(void*) ()
#2 0x000000000069d3fd in kaldi::CuMatrix::Destroy() ()
#3 0x00000000006a438d in kaldi::CuMatrix::Resize(int, int, kaldi::MatrixResizeType, kaldi::MatrixStrideType) ()
#4 0x00000000006cd8b8 in kaldi::nnet3::NnetComputer::ExecuteCommand() ()
#5 0x00000000006cece2 in kaldi::nnet3::NnetComputer::Run() ()
#6 0x00000000006c3f0d in kaldi::nnet3::DecodableNnetLoopedOnlineBase::AdvanceChunk() ()
#7 0x00000000006c42a0 in kaldi::nnet3::DecodableAmNnetLoopedOnline::LogLikelihood(int, int) ()
#8 0x00000000004640fd in kaldi::LatticeFasterOnlineDecoder::ProcessEmitting(kaldi::DecodableInterface*) ()
#9 0x00000000004644db in kaldi::LatticeFasterOnlineDecoder::AdvanceDecoding(kaldi::DecodableInterface*, int) ()

@danpovey
Copy link
Contributor

danpovey commented Sep 6, 2017 via email

@danpovey danpovey closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants