-
Notifications
You must be signed in to change notification settings - Fork 10.5k
TensorFlow: remove the unnecessary code in CTensorFlow #29225
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
TensorFlow: remove the unnecessary code in CTensorFlow #29225
Conversation
@swift-ci please test tensorflow |
f1bcafa
to
be046c1
Compare
@swift-ci please test tensorflow |
be046c1
to
fe1a301
Compare
@swift-ci please test tensorflow |
fe1a301
to
210ce03
Compare
@swift-ci please test tensorflow |
@swift-ci please clean test tensorflow |
This removes the local CTensorFlow library which had dead code and a decent chunk of complexity to import the TensorFlow interfaces. As a simplifying step towards extracting the TensorFlow module, this introduces a second copy of the tensorflow-swift-apis code for the CTensorFlow module. The user visible parts of this change amount to restructuring the tensorflow headers and locations. The headers are now installed to `lib/swift/tensorflow` and replicate the system header location layout, of `tensorflow/c/...`. This allows for re-use of a system-wide installation of TensorFlow on Linux or a standalone packaged library on Darwin. This sets the stage to move towards externalising the build for the TensorFlow module by removing the dependency on a library out-side of the directory. The build rules are largely replicating the build infrastructure which has been constructed in the swift-apis repository.
210ce03
to
1136b73
Compare
@swift-ci please clean test tensorflow |
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.
The user visible parts of this change amount to restructuring the
tensorflow headers and locations. The headers are now installed to
lib/swift/tensorflow
and replicate the system header location layout,
oftensorflow/c/...
. This allows for re-use of a system-wide
installation of TensorFlow on Linux or a standalone packaged library on
Darwin.
I wonder if this change affects apple/swift
tensorflow
branch developers (e.g. do README build instructions need to be updated), or no? Perhaps not yet, but the "next steps" sound like they'll require developers to install TensorFlow on their system:
This sets the stage to move towards externalising the build for the
TensorFlow module by removing the dependency on a library out-side of
the directory. The build rules are largely replicating the build
infrastructure which has been constructed in the swift-apis repository.
On the topic of README build instructions: there are two In early 2018, @gribozavr recommended adding these two separate flags to be future-facing for TensorFlow cross-compilation support. But in reality, they're not set up properly for cross-compilation, and they're not really used properly. |
Yeah, think that next steps will be more appropriate for that. Right now, this is just restructuring it internally, and we can use the build of TensorFlow that we are doing. Id like to move away from that and make TensorFlow an external dependency instead. The immediate goals here are to work towards reducing the changes in the tensorflow branch. I don't think that the options really help the cross-compilation given that the current CMake setup is pretty hostile to cross-compilation. Splitting up the SDK and the toolchain will help clear that up. In the mean time, reducing the complexity (and not supporting cross-compilation via build-script) is probably the fastest way forward to support cross-compilation (in fact, that is how I have android builds setup). |
This removes the local CTensorFlow library which had dead code and a
decent chunk of complexity to import the TensorFlow interfaces. As a
simplifying step towards extracting the TensorFlow module, this
introduces a second copy of the tensorflow-swift-apis code for the
CTensorFlow module.
The user visible parts of this change amount to restructuring the
tensorflow headers and locations. The headers are now installed to
lib/swift/tensorflow
and replicate the system header location layout,of
tensorflow/c/...
. This allows for re-use of a system-wideinstallation of TensorFlow on Linux or a standalone packaged library on
Darwin.
This sets the stage to move towards externalising the build for the
TensorFlow module by removing the dependency on a library out-side of
the directory. The build rules are largely replicating the build
infrastructure which has been constructed in the swift-apis repository.
Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.
Resolves SR-NNNN.