New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-13529] Forward-mode differentiation: thunk generation crash #55966
Comments
@swift-ci create |
Forward-mode is not supported and will be deprecated. Closing. |
I did come across this, which produced a similar error message under the func partial<T, U, V>(
_ f: @differentiable(reverse) (T, T) -> V,
y: U
) -> @differentiable(reverse) (T) -> V {
{ x in f(x, x) }
} Stack Trace
Toolchain: June 8, 2022 Development Snapshot |
Here is the full investigation of the new set of crashers. Above each one is the first line of the error message. Credit to @stevapple for spotting this crash. import _Differentiation
// Bad generic parameter in τ_0_1
func process<T: Differentiable>(
_ f: (T) -> T
) where T == T.TangentVector {
pullback(at: .zero, of: { x in
f(x)
})(.zero)
}
// Assertion failed: (paramInfos.size() == arguments.size()), function OperandToInoutArgument, file SILInstruction.h, line 2716.
func partial<T, U, V>(
_ f: @differentiable(reverse) (T, U) -> V,
y: U
) -> @differentiable(reverse) (T) -> V {
{ x in f(x, y) }
}
// Assertion failed: (signature || !origType->hasTypeParameter()), function initSwiftType, file AbstractionPattern.h, line 528.
func partial<T, U, V>(
_ f: @differentiable(reverse) (T, T) -> V,
y: U
) -> @differentiable(reverse) (T) -> V {
{ x in f(x, x) }
}
// Bad generic parameter in τ_0_2
func partial<T, V>(
_ f: @differentiable(reverse) (T, T) -> V,
y: T
) -> @differentiable(reverse) (T) -> V {
{ x in f(x, x) }
}
// Bad generic parameter in τ_0_2
func partial<T, V>(
_ f: @differentiable(reverse) (T, T) -> V
) -> @differentiable(reverse) (T) -> V {
{ x in f(x, x) }
}
// Bad generic parameter in τ_0_1
func partial<T>(
_ f: @differentiable(reverse) (T, T) -> T
) -> @differentiable(reverse) (T) -> T {
{ x in f(x, x) }
}
// Bad generic parameter in τ_0_1
func partial<T>(
_ f: (T) -> T
) -> @differentiable(reverse) (T) -> T {
{ x in f(x) }
}
|
Additional Detail from JIRA
md5: bf77f0398bb89e022f17050e14447b10
Issue Description:
Reproducer:
The crash occurs while attempting to generate a reabstraction thunk for a function-typed value (differential callee) during forward-mode differentiation.
The text was updated successfully, but these errors were encountered: