-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AutoDiff upstream] Add @transpose
attribute.
#27545
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
b7415d2
to
58c5d4d
Compare
The `@transpose(of:)` attribute registers a function as a transpose of another function. This patch adds the `@transpose(of:)` attribute definition, syntax, parsing, and printing. Resolves TF-827. Todos: - Type-checking (TF-830, TF-1060). - Enable serialization (TF-838). - Use module-qualified names instead of custom qualified name syntax/parsing (TF-1066).
58c5d4d
to
c842fee
Compare
@transpose
attribute.
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.
Nice!
Update gyb-generated files for `@transpose` attribute. Friend PR: swiftlang/swift#27545
swiftlang/swift-syntax#189 |
Build failed |
Build failed |
CI failed for |
swiftlang/swift-syntax#189 |
Use it in both `Parser::canParseTypeIdentifier` and `Parser::canParseBaseTypeForQualifiedDeclName`.
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.
Parser/Syntax changes look good!
Update gyb-generated files for `@transpose` attribute. Friend PR: swiftlang/swift#27545
swiftlang/swift-syntax#189 |
Build failed |
Build failed |
Update gyb-generated files for `@transpose` attribute. Friend PR: swiftlang/swift#27545
The
@transpose(of:)
attribute registers a function as a transpose of anotherfunction. This patch adds the
@transpose(of:)
attribute definition, syntax,parsing, and printing.
Resolves TF-827.
Examples:
The differentiable programming manifesto has more information and examples.
Note: this code is upstreamed from
tensorflow
branch.Known todos and issues are referenced in comments:
@transpose
attribute type-checking (TF-830, TF-1060).@transpose
attribute serialization (TF-838).(TF-1066).
We would like to upstream code and continue development on
master
, if that's acceptable!