-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[TF] Moved the TensorFlow module to swift-apis. #24452
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
Conversation
Quick test on enabling compiler optimizations: only two tests fail:
Both fail with an error that looks like:
Given that we get these two failures with optimizations, I have not enabled them in this PR, yet, but I think we're very close to being able to support them. |
How would that work? they would be interdependent. |
@pschuh The new |
@pschuh never mind, you're right they are interdependent. How about we bring |
Moving to swift-apis is definitely a good direction, but having a huge file in the source code may not be ideal. One option is to require generating wrappers before running |
Yes, binding generation should not happen per-user. I found it is very easy to get inconsistent results from doing this even if you install the dependencies. We're going to have to have a wrapper makefile or something that builds tensorflow. This could also copy in the current swift-bindings into a sub-directory with gitignore or something. This could work conceptually as though the bindings were generated on-demand. Just have a fallback that if the necessary python dependencies are not available it downloads the bindings from github. Perhaps something along those lines could make things simpler? |
@rxwei @pschuh I just got back from traveling and can resume with this. Given that the merge seems to have happened, should I now proceed with update these two PRs to reflect all updates for the move to Regarding the raw bindings, what I did locally on my machine is move the contents of the |
Hi Anthony, Sounds good. I have https://github.com/pschuh/swift-apis/tree/experimental-dan-branch where I just did a straight port out of the swift repo to test out some of the workflow things that need to happen since it sounds like we want to build Tensorflow into the toolchain still. Without that, script mode is slightly painful. I'm currently blocked on some bugs, but dan is looking at them. A cmake pre-step that builds tensorflow and downloads the bindings is fine by me. I'm not exactly following what your current plan is, but I'd like to focus on the short-path of getting Tensorflow out of the swift compiler repo. I think in that plan, the /TensorFlow and /DeepLearning get merged into a single repo and download swift-bindings files as a pre-step. We can then organize things better from there. |
Hey Parker! Regarding your port, for now I am not moving We can also move |
@pschuh You can check out my temporary solution in tensorflow/swift-apis#109. Both that and this PR are now updated. I'm currently compiling and will report here once I'm able to confirm that all tests pass locally. |
Ah, very curious. That is another option keeping them separate. An interesting result of that design is we might be able to make a target in the main tensorflow repo that builds a .so file and the swiftmodule that we can include in our toolchain for the base tensorflow build. This would make it so that it would only depend on swift pm. |
@pschuh All tests pass locally so both this PR and tensorflow/swift-apis#109 should be ready to merge if we decide to do so. Is there anything else blocking us before we can go ahead with this move? |
Moves all of `stdlib/TensorFlow` from apple/swift. Friend PR: swiftlang/swift#24452.
@swift-ci please test tensorflow Linux |
@swift-ci please clean test tensorflow Linux |
@swift-ci please test tensorflow Linux |
3 similar comments
@swift-ci please test tensorflow Linux |
@swift-ci please test tensorflow Linux |
@swift-ci please test tensorflow Linux |
@rxwei Thanks for testing and merging tensorflow/swift-apis#109. I crashed at some point last night. I just pushed a small edit that should fix the failing test here. |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow Linux |
All tests pass on the CI so I'll go ahead and try to remove the tacky TensorGroup stuff in a separate PR. |
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.
Congrats on completing this move, and thank you for your patience!
Thanks Richard! And thanks for agreeing to go forward with this. I think it'll make future contributions much easier and faster. :) |
@pschuh @rxwei @saeta This PR moves the entirety of the
TensorFlow
module toswift-apis
. All tests pass locally. :)Friend PR: tensorflow/swift-apis#109.