Another update from our side!
Quite a few developments since last May.
We've been able to get a list of improvements merged among which:
- [AutoDiff] Support custom derivatives for @_alwaysEmitIntoClient functions by kovdan01 · Pull Request #78908 · swiftlang/swift · GitHub @_alwaysEmitIntoClient support
- [AutoDiff] Define derivative for concrete SIMD.init(repeating:) by kovdan01 · Pull Request #81864 · swiftlang/swift · GitHub combined @_alwaysEmitIntoClient and @_transparent support. These PR's enable us to write derivatives for functions marked with @_alwaysEmitIntoClient and @_transparent
- Support differentiation of wrapped value modify accessors by asl · Pull Request #78794 · swiftlang/swift · GitHub support for property wrapper modify accessors
Some performance improvements: - [AutoDiff] Run AutoDiff closure spec pass for all VJPs by kovdan01 · Pull Request #81548 · swiftlang/swift · GitHub
Bug fixes/improvements: - [AutoDiff] Use `LinkEntity::SecondaryPointer` for diff witness by kovdan01 · Pull Request #82412 · swiftlang/swift · GitHub
- [AutoDiff] Correct propagate adjoints for array literal values by asl · Pull Request #81676 · swiftlang/swift · GitHub
- [AutoDiff] Better diagnose non-differentiability for throwing functions by asl · Pull Request #81669 · swiftlang/swift · GitHub
Other: - [AutoDiff][gardening] Auto-format ClosureSpecialization.swift by kovdan01 · Pull Request #83925 · swiftlang/swift · GitHub
There's also been work on some exciting new improvements:
- [AutoDiff] Closure specialization: specialize branch tracing enums by kovdan01 · Pull Request #83926 · swiftlang/swift · GitHub work towards improvements to closure optimization
- [AutoDiff] Initial support for differentiation of throwing functions by asl · Pull Request #82653 · swiftlang/swift · GitHub Support for throwing functions
There are still some great improvements waiting for review
- Add AST representation for coroutines by asl · Pull Request #78508 · swiftlang/swift · GitHub _modify subscript support
- Fix two issues related with emission of differentiability witnesses by asl · Pull Request #80983 · swiftlang/swift · GitHub
- Ensure we are adding T : Differentiable conformance from protocol conditional conformance by asl · Pull Request #77446 · swiftlang/swift · GitHub
Aside from the direct swift compiler work there's also been a new swift-numerics release
swift-numerics drops Complex's conditional conformance to Differentiable
Complexno longer conditionally conforms toDifferentiable. Given that the Differentiation module has not formally stabilized, support for it will be moved onto a feature branch for now.
The conditional conformance has been moved to our swift-numerics-differentiable package
and is available as of version 1.2.0.
We're really happy with the progress we've made the last months and especially excited about the support for _modify accessors and throwing functions. This will unlock brand new ways to write differentiable Swift code!
This unlocks lots of improvements for our simulation and control applications. We'd love to talk about how this could help you!