-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Autodiff upstream] Add build-script flag for differentiable programm… #27595
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
[Autodiff upstream] Add build-script flag for differentiable programm… #27595
Conversation
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.
Verified the following invocations:
utils/build-script --enable-experimental-differentiable-programming
: enabled.utils/build-script
: enabled (by default).utils/build-script --enable-experimental-differentiable-programming=false
: disabled.
As discussed here, this PR adds the @jckarter: could you please help review (or loop in reviewers)? That would be a big help for enabling our progress. |
Looks okay to me. @gottesmm does the |
# Compile differentiable programming sources only if enabled. | ||
set(SWIFTLIB_DIFFERENTIABLE_PROGRAMMING_SOURCES) | ||
if(SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING) | ||
# TODO: Add `_Differentiable` protocol. |
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.
Note: #27511 will add the _Differentiable
protocol - separate patch to facilitate review.
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
Pinging @gottesmm for review, as requested by him |
utils/build-script
Outdated
@@ -601,6 +601,9 @@ class BuildScriptInvocation(object): | |||
args.build_jobs) | |||
] | |||
|
|||
if args.enable_experimental_differentiable_programming: | |||
impl_args += ["--enable-experimental-differentiable-programming"] |
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.
I don't think you need to do this in build-script-impl. You should be able to add this as a cmake option like this: https://github.com/apple/swift/blob/master/utils/swift_build_support/swift_build_support/products/swift.py
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.
Thanks! Done in 4bef66b - could you please re-review?
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.
There are tests for this, no?
I updated the EDIT: @gottesmm shared that there are extra CMake flag tests. Added in cc2d822, mimicking existing tests:
|
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.
Can you squash/make sure this passes pylint? Then LGTM
…ing. Add `--enable-experimental-differentiable-programming` build-script flag. The build-script flag enables/disables standard library additions related to differentiable programming. This will allow official Swift releases to disable these additions. The build-script flag is on by default to ensure testing of differentiable programming standard library additions. An additional driver flag must be enabled to use differentiable programming features: swiftlang#27446
cc2d822
to
7f8d133
Compare
Squashed. (I tend to use "Squash and merge" when merging.) I ran |
@swift-ci Please test |
Build failed |
Build failed |
Linux CI failed due to a seemingly unrelated SourceKitLSP error:
I'll try triggering it again. |
@swift-ci Please test linux |
Thanks to reviewers! |
…ing. (swiftlang#27595) Add `--enable-experimental-differentiable-programming` build-script flag. The build-script flag enables/disables standard library additions related to differentiable programming. This will allow official Swift releases to disable these additions. The build-script flag is on by default to ensure testing of differentiable programming standard library additions. An additional driver flag must be enabled to use differentiable programming features: swiftlang#27446
) Add `--enable-experimental-differentiable-programming` build-script flag. The build-script flag enables/disables standard library additions related to differentiable programming. This will allow official Swift releases to disable these additions. The build-script flag is on by default to ensure testing of differentiable programming standard library additions. An additional driver flag must be enabled to use differentiable programming features: #27446 Mirror of #27595, with minor changes specific to tensorflow branch.
…ing.
Add
--enable-experimental-differentiable-programming
build-script flag.The build-script flag enables/disables standard library additions
related to differentiable programming. This will allow official Swift
releases to disable these additions.
The build-script flag is on by default to ensure testing of
differentiable programming standard library additions. An additional
driver flag must be enabled to use differentiable programming features:
#27446