You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We support tupling of differentiable functions as long as they drop @differentiable.
737
+
let _:((Float,Float))->Float=tuplify(withoutNoDerivative)
738
+
letfn1=tuplify(withoutNoDerivative)
739
+
_ =fn1((0,0))
740
+
741
+
// In this case we also drop @noDerivative.
742
+
let _:((Float,Float))->Float=tuplify(withNoDerivative)
743
+
letfn2=tuplify(withNoDerivative)
744
+
_ =fn2((0,0))
745
+
746
+
// We do not support tupling into an @differentiable function.
747
+
let _ =tuplifyDifferentiable(withoutNoDerivative) // expected-error {{cannot convert value of type '@differentiable(reverse) (Float, Float) -> Float' to expected argument type '@differentiable(reverse) (Float) -> Float'}}
748
+
let _ =tuplifyDifferentiable(withNoDerivative) // expected-error {{cannot convert value of type '@differentiable(reverse) (Float, @noDerivative Float) -> Float' to expected argument type '@differentiable(reverse) (Float) -> Float'}}
0 commit comments