-
Notifications
You must be signed in to change notification settings - Fork 74k
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
[CMake] Optionally support building TF as a shared lib #9124
[CMake] Optionally support building TF as a shared lib #9124
Conversation
Can one of the admins verify this patch? |
It seems like you save my life ;) Thank you! |
@vit-stepanovs I should run cmake with |
@tomjaguarpw, the actual option name is tensorflow_BUILD_SHARED_LIB, not BUILD_SHARED_LIB. If you use that, cmake generates a project tensorflow.vcxproj (not tensorflow.sln!) which you can use to build the DLL. |
Nice! LGTM, @mrry what do you think? |
Jenkins, test this please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too!
Thanks! |
It works great on both Linux and Windows for me. Why is this PR removed from release 1.1.0? (it was there in 1.1.0-rc2) |
It's probably because it didn't make it before the cutoff point when we forked the branch. /CC: @av8ramit |
I don't believe this was in 1.1.0-rc2, but yes we decided to push it back to 1.2 since it was merged too late for 1.1 to test properly. |
Is there some way to build tensorflow as static lib? |
I tried this in conjunction with #9666 to try to build a debug DLL,, but the generated .def file had over 120K symbols, so it exceeded the 65535 limit. Any way to filter more aggressively? |
@girving another reason to restrict symbols #9525
On May 12, 2017 1:24 PM, "Andy Dennie" <notifications@github.com> wrote:
I tried this in conjunction with #9666
<#9666> to try to build a
debug DLL,, but the generated .def file had over 120K symbols, so it
exceeded the 65535 limit. Any way to filter more aggressively?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#9124 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AT_SbaXsy-KifiQ0902rs8mKlt-4mHgSks5r5MAKgaJpZM4M5rj->
.
|
Nice. Is there a thread I should notify once we make progress here? This one seems merged. |
Currently, TF is already built as a shared library that is included in the Python package. However, that library:
This PR allows optionally building TF as a stand-alone DLL that does not have the above issues. I am also working on allowing CMake to link all C++ tests against that DLL, and will submit such changes in a separate PR.
As a bonus, this PR also fixes a build break for tf_tools.cmake when GPU is enabled.