Hide unnecessary symbols exposed in tensorflow_text/python/ops/*.so
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 379
- Avg merge
- 3h 30m
- Merged PRs (30d)
- 8
Description
In order to run inference on some of the TF models that uses TF-text ops we need preload the custom ops from TensorFlow-Text in our C++ application.
Unfortunately, these .sos expose all their underlying symbols out. This is especially problematic for regex_spilt_ops.so. This shared library exposes re2 symbols that conflicts with our application which uses libre2-dev package. These conflicts lead to manifestation of weird behaviors our application.
Proposed Solution:
Hide all the symbols except for what are needed by TF for the custom ops. This is done with ldscript which is a standard practice for shared library.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the shared libraries under tensorflow_text/python/ops/*.so, especially regex_spilt_ops.so, are built and how the existing build handles linker options. Add an ldscript-based symbol export restriction for the TensorFlow custom ops, then verify that unrelated re2 symbols are no longer exposed while the custom ops remain usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, tensorflow
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100