Skip to content

Commit 6907933

Browse files
Merge pull request #60992 from AnthonyLatsis/migrate-test-suite-to-gh-issues-25
Gardening: Migrate test suite to GH issues p. 25
2 parents 7f63b4b + bd28606 commit 6907933

20 files changed

+93
-62
lines changed

test/AutoDiff/SIL/Serialization/differentiable_function_type.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name main
33
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.sil -module-name main
4-
// NOTE(SR-12090): Workaround because import declarations are not preserved in .sib files.
4+
5+
// https://github.com/apple/swift/issues/54526
6+
// Workaround because import declarations are not preserved in .sib files.
57
// RUN: sed -e 's/import Swift$/import Swift; import _Differentiation/' %t/tmp.sil > %t/tmp_fixed.sil
68
// RUN: %target-sil-opt %t/tmp_fixed.sil -module-name main -emit-sorted-sil | %FileCheck %s
79

8-
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
10+
// `shell` is required only to run `sed` as a
11+
// https://github.com/apple/swift/issues/54526 workaround.
912
// REQUIRES: shell
1013

1114
sil_stage raw

test/AutoDiff/SIL/differentiability_witness_function_inst.sil

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// RUN: %empty-directory(%t)
88
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name main
99
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.sil -module-name main
10-
// NOTE(SR-12090): Workaround because import declarations are not preserved in .sib files.
10+
11+
// https://github.com/apple/swift/issues/54526
12+
// Workaround because import declarations are not preserved in .sib files.
1113
// RUN: sed -e 's/import Swift$/import Swift; import _Differentiation/' %t/tmp.sil > %t/tmp_fixed.sil
1214
// RUN: %target-sil-opt %t/tmp_fixed.sil -module-name main -emit-sorted-sil | %FileCheck %s
1315

@@ -16,7 +18,8 @@
1618
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=IRGEN --check-prefix %target-cpu
1719
// NOTE: `%target-cpu`-specific FileCheck lines exist because lowered function types in LLVM IR differ between architectures.
1820

19-
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
21+
// `shell` is required only to run `sed` as a
22+
// https://github.com/apple/swift/issues/54526 workaround.
2023
// REQUIRES: shell
2124

2225
sil_stage raw

test/AutoDiff/SIL/differentiability_witness_function_inst_transpose.sil

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
// RUN: %empty-directory(%t)
1212
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name main
1313
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.sil -module-name main
14-
// NOTE(SR-12090): Workaround because import declarations are not preserved in .sib files.
14+
// https://github.com/apple/swift/issues/54526
15+
// Workaround because import declarations are not preserved in .sib files.
1516
// RUN: sed -e 's/import Swift$/import Swift; import _Differentiation/' %t/tmp.sil > %t/tmp_fixed.sil
1617
// RUN: %target-sil-opt %t/tmp_fixed.sil -module-name main -emit-sorted-sil | %FileCheck %s
1718

18-
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
19+
// `shell` is required only to run `sed` as a
20+
// https://github.com/apple/swift/issues/54526 workaround.
1921
// REQUIRES: shell
2022

2123
sil_stage raw

test/AutoDiff/SIL/differentiable_function_inst.sil

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
// RUN: %empty-directory(%t)
88
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name main
99
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.sil -module-name main
10-
// NOTE(SR-12090): Workaround because import declarations are not preserved in .sib files.
10+
11+
// https://github.com/apple/swift/issues/54526
12+
// Workaround because import declarations are not preserved in .sib files.
1113
// RUN: sed -e 's/import Swift$/import Swift; import _Differentiation/' %t/tmp.sil > %t/tmp_fixed.sil
1214
// RUN: %target-sil-opt %t/tmp_fixed.sil -module-name main -emit-sorted-sil | %FileCheck %s --check-prefix=CHECK-SIL
1315

1416
// IRGen test.
1517

1618
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK-IRGEN
1719

18-
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
20+
// `shell` is required only to run `sed` as a
21+
// https://github.com/apple/swift/issues/54526 workaround.
1922
// REQUIRES: shell
2023

2124
// Would need to update for arm64e.

test/AutoDiff/SIL/linear_function_inst.sil

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// RUN: %empty-directory(%t)
88
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name main
99
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.sil -module-name main
10-
// NOTE(SR-12090): Workaround because import declarations are not preserved in .sib files.
10+
11+
// https://github.com/apple/swift/issues/54526
12+
// Workaround because import declarations are not preserved in .sib files.
1113
// RUN: sed -e 's/import Swift$/import Swift; import _Differentiation/' %t/tmp.sil > %t/tmp_fixed.sil
1214
// RUN: %target-sil-opt %t/tmp_fixed.sil -module-name main -emit-sorted-sil | %FileCheck %s --check-prefix=CHECK-SIL
1315

test/AutoDiff/SIL/sil_differentiability_witness.sil

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
// RUN: %empty-directory(%t)
88
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name main
99
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.sil -module-name main
10-
// NOTE(SR-12090): Workaround because import declarations are not preserved in .sib files.
10+
11+
// https://github.com/apple/swift/issues/54526
12+
// Workaround because import declarations are not preserved in .sib files.
1113
// RUN: sed -e 's/import Swift$/import Swift; import _Differentiation/' %t/tmp.sil > %t/tmp_fixed.sil
1214
// RUN: %target-sil-opt %t/tmp_fixed.sil -module-name main -emit-sorted-sil | %FileCheck --check-prefix=ROUNDTRIP %s
1315

1416
// IRGen test.
1517

1618
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck --check-prefix=IRGEN %s
1719

18-
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
20+
// `shell` is required only to run `sed` as a
21+
// https://github.com/apple/swift/issues/54526 workaround.
1922
// REQUIRES: shell
2023

2124
sil_stage raw

test/AutoDiff/SILGen/differentiability_witness_generic_signature.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// RUN: %target-swift-emit-silgen -verify -module-name main %s -warn-redundant-requirements | %FileCheck %s
22
// RUN: %target-swift-emit-sil -verify -module-name main %s -warn-redundant-requirements
33

4-
// NOTE(SR-11950): SILParser crashes for SILGen round-trip.
4+
// NOTE: SILParser crashes for SILGen round-trip
5+
// (https://github.com/apple/swift/issues/54370).
56

67
// This file tests:
78
// - The "derivative generic signature" of `@differentiable` and `@derivative`

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}}

0 commit comments

Comments
 (0)