Skip to content

Commit 549a6a9

Browse files
committed
Gardening: Migrate test suite to GH issues: AutoDiff/SILOptimizer
1 parent 295ded6 commit 549a6a9

File tree

4 files changed

+26
-19
lines changed

4 files changed

+26
-19
lines changed

test/AutoDiff/SILOptimizer/derivative_sil.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ func foo(_ x: Float) -> Float {
8989
// CHECK-SIL: return [[DX]] : $Float
9090
// CHECK-SIL: }
9191

92-
// Check the conventions of the generated functions for a method (SR-13945).
92+
// https://github.com/apple/swift/issues/56342
93+
// Check the conventions of the generated functions for a method.
9394
struct ExampleStruct {
9495
@_silgen_name("fooMethod")
9596
@differentiable(reverse)

test/AutoDiff/SILOptimizer/differentiation_diagnostics.swift

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,8 @@ func testClassTangentPropertyNotStored(_ c: ClassTangentPropertyNotStored) -> Fl
618618
// CHECK-LABEL: sil {{.*}} @test_class_tangent_property_not_stored
619619
// CHECK: ref_element_addr {{%.*}} : $ClassTangentPropertyNotStored, #ClassTangentPropertyNotStored.x
620620

621-
// SR-13134: Test stored property access with conditionally `Differentiable` base type.
621+
// https://github.com/apple/swift/issues/55580
622+
// Test stored property access with conditionally `Differentiable` base type.
622623

623624
struct Complex<T: FloatingPoint> {
624625
var real: T
@@ -630,7 +631,7 @@ extension Complex: Differentiable where T: Differentiable {
630631
extension Complex: AdditiveArithmetic {}
631632

632633
@differentiable(reverse)
633-
func SR_13134(lhs: Complex<Float>, rhs: Complex<Float>) -> Float {
634+
func f_55580(lhs: Complex<Float>, rhs: Complex<Float>) -> Float {
634635
return lhs.real + rhs.real
635636
}
636637

@@ -692,7 +693,8 @@ func projectedValueAccess(_ s: Struct) -> Float {
692693
s.$y.wrappedValue
693694
}
694695

695-
// SR-12640: Test `wrapperValue.modify` differentiation.
696+
// https://github.com/apple/swift/issues/55084
697+
// Test `wrapperValue.modify` differentiation.
696698

697699
// expected-error @+2 {{function is not differentiable}}
698700
// expected-note @+2 {{when differentiating this function definition}}
@@ -722,7 +724,7 @@ func tupleArrayLiteralInitialization(_ x: Float, _ y: Float) -> Float {
722724
// Subset parameter differentiation thunks
723725
//===----------------------------------------------------------------------===//
724726

725-
// FIXME(SR-13046): Non-differentiability diagnostic crash due to invalid source location.
727+
// FIXME: Non-differentiability diagnostic crash due to invalid source location (https://github.com/apple/swift/issues/55492).
726728
/*
727729
func testNoDerivativeParameter(_ f: @differentiable(reverse) (Float, @noDerivative Float) -> Float) -> Float {
728730
return gradient(at: 2) { x in f(x * x, x) }
@@ -774,27 +776,27 @@ public func fragileDifferentiable(_ x: Float) -> Float {
774776
}
775777

776778

777-
// FIXME(rdar://87429620): Differentiable curry thunk RequirementMachine error.
779+
// FIXME: Differentiable curry thunk RequirementMachine error (rdar://87429620, https://github.com/apple/swift/issues/54819).
778780
#if false
779781
// TF-1208: Test curry thunk differentiation regression.
780-
public struct SR_14228_Struct<Scalar> {
782+
public struct Struct_54819<Scalar> {
781783
var x: Scalar
782784
}
783-
extension SR_14228_Struct: Differentiable where Scalar: Differentiable {
785+
extension Struct_54819: Differentiable where Scalar: Differentiable {
784786
@differentiable(reverse)
785787
public static func id(x: Self) -> Self {
786788
return x
787789
}
788790
}
789791
@differentiable(reverse, wrt: x)
790-
public func SR_14228<Scalar: Differentiable>(
791-
_ x: SR_14228_Struct<Scalar>,
792-
// NOTE(TF-1208): This diagnostic is unexpected because `SR_14228_Struct.id` is marked `@differentiable`.
792+
public func f_54819<Scalar: Differentiable>(
793+
_ x: Struct_54819<Scalar>,
794+
// NOTE(TF-1208): This diagnostic is unexpected because `Struct_54819.id` is marked `@differentiable`.
793795
// xpected-error @+3 2 {{function is not differentiable}}
794796
// xpected-note @+2 {{differentiated functions in '@inlinable' functions must be marked '@differentiable' or have a public '@derivative'; this is not possible with a closure, make a top-level function instead}}
795797
// xpected-note @+1 {{opaque non-'@differentiable' function is not differentiable}}
796-
reduction: @differentiable(reverse) (SR_14228_Struct<Scalar>) -> SR_14228_Struct<Scalar> = SR_14228_Struct.id
797-
) -> SR_14228_Struct<Scalar> {
798+
reduction: @differentiable(reverse) (Struct_54819<Scalar>) -> Struct_54819<Scalar> = Struct_54819.id
799+
) -> Struct_54819<Scalar> {
798800
reduction(x)
799801
}
800802
#endif

test/AutoDiff/SILOptimizer/forward_mode_diagnostics.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func activeInoutParamMutatingMethod(_ x: Mut) -> Mut {
119119
// Subset parameter differentiation thunks
120120
//===----------------------------------------------------------------------===//
121121

122-
// FIXME(SR-13046): Non-differentiability diagnostic crash due to invalid source location.
122+
// FIXME: Non-differentiability diagnostic crash due to invalid source location (https://github.com/apple/swift/issues/55492).
123123
/*
124124
func testNoDerivativeParameter(_ f: @differentiable(reverse) (Float, @noDerivative Float) -> Float) -> Float {
125125
return derivative(at: 2, 3) { (x, y) in f(x * x, y) }
@@ -238,7 +238,7 @@ final class ClassTangentPropertyWrongType: Differentiable {
238238
func move(by offset: TangentVector) {}
239239
}
240240

241-
// SR-13464: Missing support for classes in forward-mode AD
241+
// FIXME: Missing support for classes in forward-mode AD causes crash (https://github.com/apple/swift/issues/55906).
242242
/*
243243
// xpected-error @+2 {{function is not differentiable}}
244244
// xpected-note @+3 {{when differentiating this function definition}}
@@ -287,7 +287,7 @@ final class ClassTangentPropertyNotStored: Differentiable {
287287
func move(by offset: TangentVector) {}
288288
}
289289

290-
// SR-13464: Missing support for classes in forward-mode AD
290+
// FIXME: Missing support for classes in forward-mode AD causes crash (https://github.com/apple/swift/issues/55906).
291291
/*
292292
// xpected-error @+2 {{function is not differentiable}}
293293
// xpected-note @+3 {{when differentiating this function definition}}

test/AutoDiff/SILOptimizer/property_wrappers.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ struct Struct: Differentiable {
4747
@Wrapper @SimpleWrapper var trivial: Float = 10
4848
@Wrapper @SimpleWrapper var tracked: Tracked<Float> = 20
4949
@Wrapper @SimpleWrapper var nontrivial: NontrivialLoadable<Float> = 30
50-
// Tests SR-12800: semantic member accessors should have empty linear map structs.
50+
51+
// https://github.com/apple/swift/issues/55245
52+
// Semantic member accessors should have empty linear map structs.
5153
@DifferentiableWrapper var differentiableWrapped: Float = 40
5254

5355
static func testGetters() {
@@ -75,15 +77,17 @@ struct GenericStruct<T: Differentiable>: Differentiable {
7577
@Wrapper @SimpleWrapper var nontrivial: NontrivialLoadable<Float> = 30
7678
@Wrapper @SimpleWrapper var addressOnly: T
7779

78-
// SR-12778: Test getter pullback for non-trivial loadable property.
80+
// https://github.com/apple/swift/issues/55223
81+
// Test getter pullback for non-trivial loadable property.
7982
static func testGetters() {
8083
let _: @differentiable(reverse) (Self) -> Float = { $0.trivial }
8184
let _: @differentiable(reverse) (Self) -> Tracked<Float> = { $0.tracked }
8285
let _: @differentiable(reverse) (Self) -> NontrivialLoadable<Float> = { $0.nontrivial }
8386
let _: @differentiable(reverse) (Self) -> T = { $0.addressOnly }
8487
}
8588

86-
// SR-12779: Test setter pullback for non-trivial loadable property.
89+
// https://github.com/apple/swift/issues/55224
90+
// Test setter pullback for non-trivial loadable property.
8791
static func testSetters() {
8892
let _: @differentiable(reverse) (inout Self, Float) -> Void =
8993
{ $0.trivial = $1 }

0 commit comments

Comments
 (0)