Thank you for explaining the substituted SIL function type design!
I wonder if the substituted SIL function type design is stabilizing soon? I saw "Use pattern substitutions to consistently abstract yields" (#30309) landed recently, are more significant changes coming?
These changes heavily broke Swift differentiable programming on the tensorflow
branch when we merged master -> tensorflow
:
-
"Enable substituted SIL function types" (#29644)
-
Fixed
tensorflow
branch (#30312) after ~1 week of work. PR description has details.
-
Fixed
-
"Distinguish invocation and pattern substitutions on SILFunctionType" (#30272)
-
Fixing
tensorflow
branch now. Expected to take 1+ days to fix.
-
Fixing
These issues surfaced in the master -> tensorflow
merge because Swift differentiable programming (end-to-end infra and tests) haven't been sufficiently upstreamed to master
yet.
As soon as we fix these issues, we plan to focus on upstreaming SIL-related differentiable programming infra to be robust against future changes. Individual upstreaming PRs may be a good place for code review (e.g. SILFunctionType::getAutoDiffDerivativeFunctionType
derivative type calculation and how it works with substituted function types).