Skip to content

Commit e8b5204

Browse files
authored
Spelling autodiff (#42546)
* spelling: differentiated Signed-off-by: Josh Soref <[email protected]> * spelling: initialization Signed-off-by: Josh Soref <[email protected]> * spelling: multiplication Signed-off-by: Josh Soref <[email protected]> * spelling: occasionally Signed-off-by: Josh Soref <[email protected]> * spelling: overriding Signed-off-by: Josh Soref <[email protected]> * Rename test Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 1b0aa6d commit e8b5204

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

test/AutoDiff/compiler_crashers_fixed/sr12886-sr112887-vjp-emitter-definite-initialization.swift renamed to test/AutoDiff/compiler_crashers_fixed/sr12886-sr12887-vjp-emitter-definite-initialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-build-swift %s
22
// RUN: %target-swift-frontend -emit-sil %s | %FileCheck %s
33

4-
// Test crashes related to differentiation and definite intiialization.
4+
// Test crashes related to differentiation and definite initialization.
55

66
// SR-12886: SIL memory lifetime verification error due to
77
// `SILCloner::visitAllocStack` not copying the `[dynamic_lifetime]` attribute.

test/AutoDiff/compiler_crashers_fixed/tf1232-autodiff-generated-declaration-mangling.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-build-swift -g %s
2-
// This test occaisionally fails to link.
2+
// This test occasionally fails to link.
33
// REQUIRES: SR14775
44

55
// TF-1232: IRGenDebugInfo crash due to lack of proper mangling for

test/AutoDiff/validation-test/differentiable_protocol_requirements.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct S: P {
133133
}
134134
}
135135

136-
// MARK: - Overridding protocol method adding `@differentiable` attribute.
136+
// MARK: - Overriding protocol method adding `@differentiable` attribute.
137137

138138
public protocol Distribution {
139139
associatedtype Value

test/AutoDiff/validation-test/forward_mode_simd.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ ForwardModeTests.test("Generics") {
229229
expectEqual(2 - g, df3(2, g))
230230

231231
// SIMDType * Scalar
232-
func testMultipication<Scalar, SIMDType: SIMD>(lhs: SIMDType, rhs: Scalar)
232+
func testMultiplication<Scalar, SIMDType: SIMD>(lhs: SIMDType, rhs: Scalar)
233233
-> SIMDType
234234
where SIMDType.Scalar == Scalar,
235235
SIMDType : Differentiable,
@@ -239,7 +239,7 @@ ForwardModeTests.test("Generics") {
239239
return lhs * rhs
240240
}
241241
func simd3Multiply(lhs: SIMD3<Double>, rhs: Double) -> SIMD3<Double> {
242-
return testMultipication(lhs: lhs, rhs: rhs)
242+
return testMultiplication(lhs: lhs, rhs: rhs)
243243
}
244244
let (val4, df4) = valueWithDifferential(at: a, 5, of: simd3Multiply)
245245
expectEqual(SIMD3<Double>(5, 10, 15), val4)

test/AutoDiff/validation-test/method.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extension Parameter : Differentiable, AdditiveArithmetic {
6868
}
6969

7070
MethodTests.testWithLeakChecking(
71-
"instance method with generated adjoint, called from differentated func"
71+
"instance method with generated adjoint, called from differentiated func"
7272
) {
7373
func f(_ p: Parameter) -> Tracked<Float> {
7474
return 100 * p.squared()
@@ -309,7 +309,7 @@ extension CustomParameter {
309309
}
310310

311311
MethodTests.testWithLeakChecking(
312-
"instance method with custom adjoint, called from differentated func"
312+
"instance method with custom adjoint, called from differentiated func"
313313
) {
314314
func f(_ p: CustomParameter) -> Tracked<Float> {
315315
return 100 * p.squared()
@@ -318,15 +318,15 @@ MethodTests.testWithLeakChecking(
318318
expectEqual(CustomParameter(x: 10 * 100), gradient(at: CustomParameter(x: 20), of: f))
319319
}
320320

321-
MethodTests.testWithLeakChecking("instance method with generated adjoint, differentated directly") {
321+
MethodTests.testWithLeakChecking("instance method with generated adjoint, differentiated directly") {
322322
// This is our current syntax for taking gradients of instance methods
323323
// directly. If/when we develop nicer syntax for this, change this test.
324324
func g(p: CustomParameter) -> Tracked<Float> { p.squared() }
325325
expectEqual(CustomParameter(x: 4), gradient(at: CustomParameter(x: 2), of: g))
326326
expectEqual(CustomParameter(x: 10), gradient(at: CustomParameter(x: 20), of: g))
327327
}
328328

329-
MethodTests.testWithLeakChecking("static method with custom adjoint, called from differentated func") {
329+
MethodTests.testWithLeakChecking("static method with custom adjoint, called from differentiated func") {
330330
func f(_ p: CustomParameter) -> Tracked<Float> {
331331
return 100 * CustomParameter.squared(p: p)
332332
}

0 commit comments

Comments
 (0)