mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[AutoDiff] Simplify conditions enabling differentiable programming. (#30765)
Previously, two conditions were necessary to enable differentiable programming: - Using the `-enable-experimental-differentiable-programming` frontend flag. - Importing the `_Differentiation` module. Importing the `_Differentiation` module is the true condition because it contains the required compiler-known `Differentiable` protocol. The frontend flag is redundant and cumbersome. Now, the frontend flag is removed. Importing `_Differentiation` is the only condition.
This commit is contained in:
@@ -449,13 +449,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
if (Args.hasArg(OPT_enable_experimental_additive_arithmetic_derivation))
|
||||
Opts.EnableExperimentalAdditiveArithmeticDerivedConformances = true;
|
||||
|
||||
if (Args.hasArg(OPT_enable_experimental_differentiable_programming)) {
|
||||
Opts.EnableExperimentalDifferentiableProgramming = true;
|
||||
// Differentiable programming implies `AdditiveArithmetic` derived
|
||||
// conformances.
|
||||
Opts.EnableExperimentalAdditiveArithmeticDerivedConformances = true;
|
||||
}
|
||||
|
||||
Opts.DebuggerSupport |= Args.hasArg(OPT_debugger_support);
|
||||
if (Opts.DebuggerSupport)
|
||||
Opts.EnableDollarIdentifiers = true;
|
||||
|
||||
Reference in New Issue
Block a user