swift icon indicating copy to clipboard operation
swift copied to clipboard

[6.1] Explicitly use minimal type expansion for autodiff-related types

Open clackary opened this issue 10 months ago • 4 comments

  • Explanation: As autodiff happens on function types it is not in general possible to determine the real expansion context of the function being differentiated. Use of minimal context is a conservative approach that should work even when libraty evolution mode is enabled.

Fixes https://github.com/swiftlang/swift/issues/55179

  • Scope: Only affects autodiff code.
  • Issues: https://github.com/swiftlang/swift/issues/55179
  • Original PRs: https://github.com/swiftlang/swift/pull/77831
  • Risk: Low.
  • Testing: Since merging the original, the added test case continues to pass on main branch.
PASS: Swift(macosx-x86_64) :: AutoDiff/compiler_crashers_fixed/issue-55179-library-evolution.swift (184 of 18701)
  • Reviewers: @asl @rxwei

clackary avatar Feb 21 '25 00:02 clackary

cc @JaapWijnen

clackary avatar Feb 21 '25 17:02 clackary

@swift-ci Please test

clackary avatar Mar 10 '25 16:03 clackary

@swift-ci please test macOS

clackary avatar Mar 10 '25 21:03 clackary

Ping @rxwei

Any concerns taking this for 6.1?

clackary avatar Mar 27 '25 16:03 clackary

Closing since we have an official 6.1 release.

clackary avatar Mar 31 '25 19:03 clackary