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

Fix stall when pynini is imported before this library #33

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

galv
Copy link
Collaborator

@galv galv commented Oct 30, 2023

Previously, doing this:

import pynini
import riva.asrlib.decoder

would end in a stall. This was because the FlagRegister template class had a static variable Mutex, that ended up being shared by default in the global symbol namespace. Because the openfst versions are different between the two libraries (I think pynini's openfst 1.8.2 uses absl::Mutex), the mutex layouts are different, probably causing the stall.

We don't want the symbols to be shared in this case, so we disable unique symbols via "-fno-gnu-unique".

Previously, doing this:

import pynini
import riva.asrlib.decoder

would end in a stall. This was because the FlagRegister template class
had a static variable Mutex, that ended up being shared by default in
the global symbol namespace. Because the openfst versions are
different between the two libraries (I think pynini's openfst 1.8.2
uses absl::Mutex), the mutex layouts are different, probably causing
the stall.

We don't want the symbols to be shared in this case, so we disable
unique symbols via "-fno-gnu-unique".
Helps with flaky CI failures.
@galv galv merged commit 8282368 into main Nov 6, 2023
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

Successfully merging this pull request may close these issues.

1 participant