File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 12
12
@differentiable public func publicDiffable( _ x: Float , _ y: Float ) -> Float { return x }
13
13
@differentiable ( wrt: ( x) ) public func publicDiffableWRT( _ x: Float , _ y: Float ) -> Float { return x }
14
14
15
+ // Tests SILGen derivative "forwarding thunk" (no derivative reabstraction/self-reordering).
16
+ @differentiable ( vjp: publicNoDerivativeReabstractionVJP)
17
+ public func publicNoDerivativeReabstraction< T: Differentiable > ( _ x: T ) -> T { return x }
18
+ public func publicNoDerivativeReabstractionVJP< T: Differentiable > ( _ x: T ) -> ( T , ( T . TangentVector ) -> T . TangentVector ) {
19
+ return ( x, { $0 } )
20
+ }
21
+
15
22
@differentiable internal func internalDiffable( _ x: Float , _ y: Float ) -> Float { return x }
16
23
@differentiable ( wrt: ( x) ) internal func internalDiffableWRT( _ x: Float , _ y: Float ) -> Float { return x }
17
24
You can’t perform that action at this time.
0 commit comments