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
@slavapestov I was planning to fix this bug, whose reproducer is here. The end of its stack trace is somewhere in RQM. I was planning to read your entire research paper just to understand what was going on at the end, but that seems like an overblown amount of effort. Is it possible for you to examine the crash a little in LLDB and give me enough of an understanding that I can utilize my experience with other areas of the compiler to fix the bug?
Your generic signature is <τ_0_0, τ_0_1, τ_0_2, τ_0_3 where τ_0_0 == τ_0_1, τ_0_2 == τ_0_3>.
τ_0_0.TangentVector is not a valid type parameter in this signature because τ_0_0 does not conform to Differentiable (which is where TangentVector is declared).
That's your bug. The autodiff code is probably forgetting to add a requirement to the signature, which is probably coming from a call to buildGenericSignature() somewhere in the autodiff code.
The reproducer posted on 4/28 is still broken with 2023-01-02a through to 2023-01-18a. We get:
Invalid type parameter in getReducedType()
Original type: τ_0_0.TangentVector
Simplified term: τ_0_0.[Differentiable:TangentVector]
Longest valid prefix: τ_0_0
Prefix type: τ_0_0
Requirement machine for <τ_0_0, τ_0_1>
Rewrite system: {
}
}
Property map: {
}
Conformance paths: {
}
and
1. Apple Swift version 5.9-dev (LLVM 3f23b4ceaf01213, Swift 0763e4b98c74b5b)
2. Compiling with the current language version
3. While evaluating request ASTLoweringRequest(Lowering AST to SIL for module smallProject)
4. While emitting property descriptor for 'x2' (at /Users/user/smallProject/main.swift:10:7)
Additional Detail from JIRA
md5: 8635dba187654182d9292136d60a56fd
relates to:
Issue Description:
Curry thunks were recently rewritten as implicit AST closures instead of SILGen'd thunks: #28698
This caused regressions in curry thunk differentiation. Extracted from
test/AutoDiff/downstream/generics.swift
:Before: no error.
After: error regarding differentiating fragile function in serialized function.
This error was introduced in #28582
The text was updated successfully, but these errors were encountered: