Skip to content

Commit c50dcae

Browse files
authored
[AutoDiff][test] Enable previously disabled tests related to issue 55492 (#77759)
A couple of tests were disabled due to crash described in #55492. Now the crash is fixed and the issue is resolved, so tests could be enabled.
1 parent 954fc67 commit c50dcae

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

test/AutoDiff/SILOptimizer/differentiation_diagnostics.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,12 +720,11 @@ func tupleArrayLiteralInitialization(_ x: Float, _ y: Float) -> Float {
720720
// Subset parameter differentiation thunks
721721
//===----------------------------------------------------------------------===//
722722

723-
// FIXME: Non-differentiability diagnostic crash due to invalid source location (https://github.com/apple/swift/issues/55492).
724-
/*
725723
func testNoDerivativeParameter(_ f: @differentiable(reverse) (Float, @noDerivative Float) -> Float) -> Float {
724+
// expected-error @+2 {{function is not differentiable}}
725+
// expected-note @+1 {{cannot differentiate with respect to a '@noDerivative' parameter}}
726726
return gradient(at: 2) { x in f(x * x, x) }
727727
}
728-
*/
729728

730729
// Test parameter subset thunk + partially-applied original function.
731730
struct TF_675 : Differentiable {

test/AutoDiff/SILOptimizer/forward_mode_diagnostics.swift

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

122-
// FIXME: Non-differentiability diagnostic crash due to invalid source location (https://github.com/apple/swift/issues/55492).
123-
/*
124122
func testNoDerivativeParameter(_ f: @differentiable(reverse) (Float, @noDerivative Float) -> Float) -> Float {
123+
// expected-error @+2 {{function is not differentiable}}
124+
// expected-note @+1 {{cannot differentiate with respect to a '@noDerivative' parameter}}
125125
return derivative(at: 2, 3) { (x, y) in f(x * x, y) }
126126
}
127-
*/
128127

129128
//===----------------------------------------------------------------------===//
130129
// Stored property access differentiation

0 commit comments

Comments
 (0)