Description
Description
I've assigned preliminary priorities for the issues, but this should be revisited.
High priority:
-
[SR-14222] [AutoDiff] Incorrect derivative for array literal with
tuple_element_addr
elements #54214
Note: FIXME(TF-977): Fix incorrect derivative for array literal withtuple_element_addr
elements.
Test: test/AutoDiff/validation-test/array.swift -
Adjoint for active values in loops are just wrong #78264
Note: FIXME(TF-584): Investigate incorrect (too big) gradient values for repeat-while loops.
Test: test/AutoDiff/validation-test/control_flow.swift
Medium priority:
-
Note: TODO(TF-1030): This will eventually not be an error.
Test: test/AutoDiff/SILOptimizer/differentiation_diagnostics.swift (seehasImplicitlyDifferentiatedClosureDefaultArgument
).The same error was fixed for curry thunks in [AutoDiff] Support curry thunks differentiation in fragile funcs #77615
-
Note: FIXME: missing reverse-mode differentiability witness for foo(_:)
Test: test/AutoDiff/SILGen/has_symbol.swift -
[SR-13166] Default derivative implementations for protocol requirements #54231
Note: TODO(TF-982): Lift this restriction and add proper support.
Test: test/AutoDiff/Sema/derivative_attr_type_checking.swift -
Note: FIXME(TF-284): Fix unexpected diagnostic. #78609
Test: AutoDiff/Sema/differentiable_attr_type_checking.swift -
[SR-13689] derivative of @_alwaysEmitIntoClient function #54445
Note: FIXME(TF-1103): Derivative registration does not yet support@_alwaysEmitIntoClient
original functions.
Test: AutoDiff/stdlib/simd.swift -
[SR-13700] Differentiation transform: support optional-related operations #54628
Note: TODO(TF-433): operator??
lowers to an activetry_apply
.
Test: test/AutoDiff/validation-test/optional.swift -
[SR-12640] Differentiation transform: support wrapped value modify accessors #55084
Note: TODO: Supportmodify
accessors
Test: test/AutoDiff/validation-test/property_wrappers.swift
Low priority:
-
[AutoDiff][test] Investigate if a
BooleanLiteralFolding
-related crash was fixed #77762
Notes:- TODO: cannot use literal
true
because it crashes - TODO: cannot use literal
false
because it crashes
Tests:
- test/AutoDiff/compiler_crashers_fixed/58660-conflicting-debug-info-inlining.swift
- test/AutoDiff/compiler_crashers_fixed/issue-58123-mutating-functions-with-control-flow.swift
- test/AutoDiff/validation-test/address_only_tangentvector.swift
- test/AutoDiff/validation-test/control_flow.swift
- TODO: cannot use literal
-
[AutoDiff][test] Ensure if
@differentiable
function SILGen thunking is fixed #77775
Note: TODO(TF-851): Uncomment the tests below after@differentiable
function SILGen thunking is fixed.
Test: test/AutoDiff/SILOptimizer/generics.swift -
Note: TODO: Re-enable the boolean-literal-folding pass and fix the test accordingly
Test: test/AutoDiff/SILOptimizer/activity_analysis.swift -
Note: TODO(TF-956): Improve location of active enum non-differentiability errors
Test: test/AutoDiff/SILOptimizer/differentiation_control_flow_diagnostics.swift -
Note: TODO(TF-957): Improve non-differentiability errors for for-in loops
Test: test/AutoDiff/SILOptimizer/differentiation_control_flow_diagnostics.swift -
Note: TODO(TF-788): Re-enable non-varied result warning.
Test: test/AutoDiff/SILOptimizer/differentiation_diagnostics.swift -
Note: TODO(TF-482): Remove diagnostics when
@differentiable
attributes are also uniqued based on generic requirements.
Test: test/AutoDiff/Sema/differentiable_attr_type_checking.swift -
Note: TODO(TF-650): It would be nice to diagnose protocol default implementation with missing
@differentiable
attribute.
Test: test/AutoDiff/Sema/differentiable_attr_type_checking.swift -
Note: TODO(TF-632): Fix "'TangentVector' is not a member type of 'Self'" diagnostic. The underlying error should appear instead: "covariant 'Self' can only appear at the top level of method result type".
Test: test/AutoDiff/Sema/differentiable_attr_type_checking.swift -
Note: FIXME: Enable test for all platforms after debugging ([SR-12741] TEST 'Swift(iphonesimulator-i386) :: AutoDiff/validation-test/control_flow.swift #55186).
Test: test/AutoDiff/validation-test/control_flow.swift -
Note: TODO(TF-1065): Consider disallowing qualified operators / operator names
Tests:- test/AutoDiff/Parse/transpose_attr_parse.swift
- test/AutoDiff/Sema/transpose_attr_type_checking.swift
Existing issues which require discussion about priorities, semantics, etc:
Class-related:
- [META][AutoDiff] Fix autodiff for classes and class-valued arguments #65012 and its sub-issues.
- [SR-12148] Make differentiation work with class types #52130 and its sub-issues.
Forward-mode-related:
- [SR-13464] Missing support for classes in forward-mode AD #55906
- [SR-13210] Forward mode differentiation SIL verification crash #55650
- [SR-13250] AutoDiff test failure: test/AutoDiff/validation-test/differentiable_protocol_requirements.swift #55690
Note: FIXME: Disabled due to test failure with-O
Test: test/AutoDiff/validation-test/differentiable_protocol_requirements.swift
Entire tests which require discussion whether we want to address tech debt for them:
Class-related:
- test/AutoDiff/SILGen/vtable.swift
- test/AutoDiff/Sema/DerivedConformances/class_differentiable.swift
- test/AutoDiff/validation-test/class_differentiation.swift
Forward-mode-related:
- test/AutoDiff/SILOptimizer/forward_mode_diagnostics.swift
- test/AutoDiff/validation-test/forward_mode_simd.swift
- test/AutoDiff/validation-test/forward_mode_simple.swift
Marked as TODO/FIXME/etc but require discussion whether we want to address them:
Class-related:
- Note: FIXME(rdar://74380324)
Test: test/AutoDiff/TBD/derivative_symbols.swift
FIXMEs are related to initializer and other special functions differentiation support - Note: FIXME(TF-1080): Fix incorrect class property
modify
accessor derivative values.
Test: test/AutoDiff/validation-test/inout_parameters.swift - Note: TODO(TF-649): Enable
@derivative
to override derivatives for original declaration defined in superclass.
Test: test/AutoDiff/Sema/derivative_attr_type_checking.swift - Note: FIXME: Enable derivative registration for class property/subscript setters ([SR-13096] Fix autodiff typing rules for class-typed function parameters #55542).
Test: test/AutoDiff/Sema/derivative_attr_type_checking.swift
This looks working for structs. - Note: FIXME(rdar://74380324)
Test: test/AutoDiff/TBD/derivative_symbols.swift
The FIXME is related to the following crash:1. Swift version 6.1-dev (LLVM 0f86f354a7bc883, Swift e6b4e0f9f171a51) 2. Compiling with effective version 4.1.50 3. While evaluating request ASTLoweringRequest(Lowering AST to SIL for module test) 6. While verifying SIL function "@$s4test5ClassCyACSfcfCTJVfSUpSr".test/AutoDiff/TBD/derivative_symbols.swift
- Note: FIXME(TF-1175): Class operands should always be marked active.
Test: test/AutoDiff/validation-test/property_wrappers.swift - Note: FIXME(TF-1176): Some values are incorrectly not marked as active:
%16
, etc.
Test: test/AutoDiff/SILOptimizer/activity_analysis.swift
This is related to class property modify accessor.
Forward-mode-related:
- Note: TODO(TF-1254): Support forward-mode differentiation and test generated differentials.
Test: test/AutoDiff/SILOptimizer/semantic_member_accessors_sil.swift - Note: TODO(TF-1173): Move floating-point mutating operation tests to
test/AutoDiff/stdlib/floating_point.swift.gyb
when forward-mode differentiation supportsinout
parameter differentiation.
Test: test/AutoDiff/validation-test/inout_parameters.swift - Note: TODO(TF-1254): Support and test forward-mode differentiation.
Test: test/AutoDiff/validation-test/property_wrappers.swift - Note: FIXME(TF-1033): Fix forward-mode ownership error for tuple with non-active
Test: test/AutoDiff/validation-test/simple_math.swift
Linear functions related:
- Note: TODO(TF-900, TF-902): Uncomment the following line to test loading a linear function from memory and direct calls to a linear function.
Test: test/AutoDiff/SILGen/differentiable_function.swift - Note: TODO: Add tests for
@differentiable(_linear)
functions.
Test: test/AutoDiff/IRGen/loadable_by_address.swift
Additional information
No response