-
Notifications
You must be signed in to change notification settings - Fork 10.5k
assocFn -> derivativeFn everywhere except Differentiation.cpp. #27597
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
@swift-ci please 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.
Thanks. There's also quite a lot of occurrences of "associated function". Could you replace them as well?
➜ swift git:(tensorflow) grep -rnw . -e 'associated function'
./test/AutoDiff/generics.swift:248:// TF-697: Test generic requirements of generated AD associated function.
./include/swift/SILOptimizer/Analysis/BottomUpIPAnalysis.h:46: /// In the following "this function" refers to the associated function.
./include/swift/AST/Types.h:3103: /// autodiff associated function.
./include/swift/AST/Types.h:3106: /// indices include self, the computed associated function type will return a
./include/swift/AST/Types.h:3124: /// Given the type of an autodiff associated function, returns the
./include/swift/AST/Types.h:3128: /// Given the type of a transposing associated function, returns the
./include/swift/AST/DiagnosticsParse.def:1600: "expected '{' to start an associated function list", ())
./include/swift/AST/DiagnosticsParse.def:1602: "expected ',' between operands in an associated function list", ())
./include/swift/AST/DiagnosticsParse.def:1604: "expected '}' to start an associated function list", ())
./include/swift/AST/DiagnosticsParse.def:1608: "expected an associated function kind attribute, e.g. '[jvp]'", ())
./include/swift/AST/ASTMangler.h:158: // Mangle the autodiff associated function (JVP/VJP) with the given:
./include/swift/AST/AutoDiff.h:434:/// The kind of an associated function.
./include/swift/AST/AutoDiff.h:455:/// autodiff associated function.
./include/swift/AST/AutoDiff.h:526:/// Computes the correct linkage for an associated function given the linkage of
./include/swift/SIL/SILDeclRef.h:160: /// corresponding autodiff associated function.
./include/swift/SIL/SILDeclRef.h:366: /// autodiff associated function.
./docs/SIL.rst:5640:In raw SIL, it is optional to provide an associated function ``with`` clause.
./docs/SIL.rst:5663:Extracts the original function or an associated function from the given
./lib/SILOptimizer/Mandatory/Differentiation.cpp:8704: // Fold associated function extractors.
./lib/SILGen/SILGen.h:151: /// Get or create an autodiff associated function thunk for the given
./lib/SILGen/SILGen.h:152: /// SILDeclRef, SILFunction, and associated function type.
./lib/SILGen/SILGen.h:158: /// Get or create an autodiff associated function vtable entry thunk for the
./lib/SILGen/SILGen.h:159: /// given SILDeclRef and associated function type.
./lib/SILGen/SILGenBuiltin.cpp:1043: // Get the associated function.
./lib/Sema/MiscDiagnostics.cpp:2251:/// from its associated function body.
./lib/Sema/TypeCheckAttr.cpp:2753: // Returns true if the original function and associated function candidate are
./lib/Sema/TypeCheckAttr.cpp:2755: // associated function have different parents, or if they both have no type
./lib/Sema/TypeCheckAttr.cpp:3596: // Get derivative kind and associated function identifier.
./lib/ParseSIL/ParseSIL.cpp:2963: // Parse associated function values as an operand list.
./lib/ParseSIL/ParseSIL.cpp:2965: // we can infer AD associated function types.
./lib/ParseSIL/ParseSIL.cpp:3006: "associated function kind"))
./lib/AST/Builtins.cpp:1038: // of the associated function type.
./lib/AST/Builtins.cpp:1045: // Generator for the resultant function type, i.e. the AD associated function.
./lib/AST/Attr.cpp:523: // Print associated function names, unless they are to be omitted.
./lib/AST/AutoDiff.cpp:168: // associated function. Return the linkage of the original function, unless
./lib/AST/AutoDiff.cpp:169: // the associated function is not exported (i.e. differentiation is not
./lib/AST/AutoDiff.cpp:179: // function. Make the associated function hidden.
./lib/AST/Type.cpp:4680: // Wrap the associated function type in additional curry levels.
./lib/AST/Type.cpp:4719: // Wrap the associated function type in additional curry levels.
./lib/SIL/SILFunctionType.cpp:153:// Returns the canonical generic signature for an autodiff associated function
./lib/SIL/SILFunctionType.cpp:154:// given an existing associated function generic signature. All differentiation
./lib/SIL/SILFunctionType.cpp:165: // Add associated function generic signature.
./lib/SIL/SILFunctionType.cpp:205: // Get the canonical associated function generic signature.
./lib/SIL/SILFunctionType.cpp:2337: // determine `silFnType` by first computing the associated function type at
./lib/SIL/SILFunctionType.cpp:2340: // function's AST type, and then computing the associated function type at the
if (Inst->hasDerivativeFunctions()) | ||
assocFns = std::make_pair(getOpValue(Inst->getJVPFunction()), | ||
derivativeFns = std::make_pair(getOpValue(Inst->getJVPFunction()), | ||
getOpValue(Inst->getVJPFunction())); |
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.
getOpValue(Inst->getVJPFunction())); | |
getOpValue(Inst->getVJPFunction())); |
I'll merge this and address my comments in a different patch, since you are OOO today. Thanks! |
…7603) `assocFn` -> `derivativeFn` `AssocFn` -> `DerivativeFn` `assocFunc` -> `derivativeFunc` `AssocFunc` -> `DerivativeFunc` `associatedFunction` -> `derivativeFunction` `AssociatedFunction` -> `DerivativeFunction` `autodiff associated function` -> `derivative function` `autodiff-associated function` -> `derivative function` `AD associated function` -> `derivative function` `associated differentiation function` -> `derivative function` This is a follow-up to #27597. Resolves [TF-882](https://bugs.swift.org/browse/TF-882).
This PR contains refactoring changes related to https://bugs.swift.org/browse/TF-882. More PRs to come.