Skip to content

Commit f127d1b

Browse files
committed
an derivative -> a derivative
1 parent e1c2749 commit f127d1b

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

docs/SIL.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5636,7 +5636,7 @@ with the original function. When a ``with`` clause is not specified, the first
56365636
operand will be differentiated to produce derivative functions, and a ``with``
56375637
clause will be added to the instruction.
56385638

5639-
In raw SIL, it is optional to provide an derivative function ``with`` clause.
5639+
In raw SIL, it is optional to provide a derivative function ``with`` clause.
56405640
In canonical SIL, a ``with`` clause is mandatory.
56415641

56425642

@@ -5659,7 +5659,7 @@ differentiable_function_extract
56595659
differentiable_function_extract [jvp] %0 : $@differentiable (T) -> T
56605660
differentiable_function_extract [vjp] %0 : $@differentiable (T) -> T
56615661

5662-
Extracts the original function or an derivative function from the given
5662+
Extracts the original function or a derivative function from the given
56635663
``@differentiable`` function. It must be provided with an extractee:
56645664
``[original]``, ``[jvp]`` or ``[vjp]``.
56655665

include/swift/AST/AutoDiff.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ struct AutoDiffLinearMapKind {
431431
operator innerty() const { return rawValue; }
432432
};
433433

434-
/// The kind of an derivative function.
434+
/// The kind of a derivative function.
435435
struct AutoDiffDerivativeFunctionKind {
436436
enum innerty : uint8_t {
437437
// The Jacobian-vector products function.
@@ -523,10 +523,10 @@ bool getBuiltinAutoDiffApplyConfig(StringRef operationName,
523523
AutoDiffDerivativeFunctionKind &kind,
524524
unsigned &arity, bool &rethrows);
525525

526-
/// Computes the correct linkage for an derivative function given the linkage of
526+
/// Computes the correct linkage for a derivative function given the linkage of
527527
/// the original function. If the original linkage is not external and
528-
/// `isDerivativeFnExported` is true, use the original function's linkage. Otherwise,
529-
/// return hidden linkage.
528+
/// `isDerivativeFnExported` is true, use the original function's linkage.
529+
/// Otherwise, return hidden linkage.
530530
SILLinkage getAutoDiffDerivativeFunctionLinkage(SILLinkage originalLinkage,
531531
bool isDerivativeFnExported);
532532

include/swift/AST/DiagnosticsParse.def

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,15 +1597,15 @@ ERROR(sil_inst_autodiff_attr_expected_rsquare,PointsToFirstBadToken,
15971597
ERROR(sil_inst_autodiff_expected_parameter_index,PointsToFirstBadToken,
15981598
"expected the index of a parameter to differentiate with respect to", ())
15991599
ERROR(sil_inst_autodiff_operand_list_expected_lbrace,PointsToFirstBadToken,
1600-
"expected '{' to start an derivative function list", ())
1600+
"expected '{' to start a derivative function list", ())
16011601
ERROR(sil_inst_autodiff_operand_list_expected_comma,PointsToFirstBadToken,
1602-
"expected ',' between operands in an derivative function list", ())
1602+
"expected ',' between operands in a derivative function list", ())
16031603
ERROR(sil_inst_autodiff_operand_list_expected_rbrace,PointsToFirstBadToken,
1604-
"expected '}' to start an derivative function list", ())
1604+
"expected '}' to start a derivative function list", ())
16051605
ERROR(sil_inst_autodiff_num_operand_list_order_mismatch,PointsToFirstBadToken,
16061606
"the number of operand lists does not match the order", ())
16071607
ERROR(sil_inst_autodiff_expected_associated_function_kind_attr,PointsToFirstBadToken,
1608-
"expected an derivative function kind attribute, e.g. '[jvp]'", ())
1608+
"expected a derivative function kind attribute, e.g. '[jvp]'", ())
16091609
ERROR(sil_inst_autodiff_expected_function_type_operand,PointsToFirstBadToken,
16101610
"expected an operand of a function type", ())
16111611

lib/SILOptimizer/Mandatory/Differentiation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ class ADContext {
11451145
/// purposes.
11461146
void foldDifferentiableFunctionExtraction(DifferentiableFunctionInst *source);
11471147

1148-
/// Get or create an derivative function index subset thunk from
1148+
/// Get or create a derivative function index subset thunk from
11491149
/// `actualIndices` to `desiredIndices` for the given derivative function
11501150
/// value and original function operand.
11511151
/// Calls `getOrCreateSubsetParametersThunkForLinearMap` to thunk the linear
@@ -1156,7 +1156,7 @@ class ADContext {
11561156
AutoDiffDerivativeFunctionKind kind, SILAutoDiffIndices desiredIndices,
11571157
SILAutoDiffIndices actualIndices);
11581158

1159-
/// Get or create an derivative function index subset thunk from
1159+
/// Get or create a derivative function index subset thunk from
11601160
/// `actualIndices` to `desiredIndices` for the given derivative function
11611161
/// value and original function operand.
11621162
SILFunction *getOrCreateSubsetParametersThunkForLinearMap(
@@ -1165,7 +1165,7 @@ class ADContext {
11651165
SILAutoDiffIndices desiredIndices, SILAutoDiffIndices actualIndices);
11661166

11671167
public:
1168-
/// Declare an external reference to an derivative function of `original`,
1168+
/// Declare an external reference to a derivative function of `original`,
11691169
/// given a `[differentiable]` attribute of `original` and the associated
11701170
/// function kind.
11711171
SILFunction *
@@ -2530,7 +2530,7 @@ static SubstitutionMap getSubstitutionMap(
25302530
return substMap;
25312531
}
25322532

2533-
/// Emits a reference to an derivative function of `original`, differentiated
2533+
/// Emits a reference to a derivative function of `original`, differentiated
25342534
/// with respect to a superset of `desiredIndices`. Returns the `SILValue` for
25352535
/// the derivative function and the actual indices that the derivative function
25362536
/// is with respect to.

0 commit comments

Comments
 (0)