swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.63k stars 10.37k forks source link

[META][AutoDiff] Tech debt from tests #77773

Open kovdan01 opened 1 day ago

kovdan01 commented 1 day ago

Description

I've assigned preliminary priorities for the issues, but this should be revisited.

High priority:

Medium priority:

Low priority:

Existing issues which require discussion about priorities, semantics, etc:

Class-related:

  1. 65012 and its sub-issues.

  2. 52130 and its sub-issues.

Forward-mode-related:

  1. 55906

  2. 55650

Entire tests which require discussion whether we want to address tech debt for them:

Class-related:

  1. test/AutoDiff/SILGen/vtable.swift
  2. test/AutoDiff/Sema/DerivedConformances/class_differentiable.swift
  3. test/AutoDiff/validation-test/class_differentiation.swift

Forward-mode-related:

  1. test/AutoDiff/SILOptimizer/forward_mode_diagnostics.swift
  2. test/AutoDiff/validation-test/forward_mode_simd.swift
  3. test/AutoDiff/validation-test/forward_mode_simple.swift

Marked as TODO/FIXME/etc but require discussion whether we want to address them:

Class-related:

  1. Note: FIXME(rdar://74380324) Test: test/AutoDiff/TBD/derivative_symbols.swift FIXMEs are related to initializer and other special functions differentiation support
  2. Note: FIXME(TF-1080): Fix incorrect class property modify accessor derivative values. Test: test/AutoDiff/validation-test/inout_parameters.swift
  3. Note: TODO(TF-649): Enable @derivative to override derivatives for original declaration defined in superclass. Test: test/AutoDiff/Sema/derivative_attr_type_checking.swift
  4. Note: FIXME: Enable derivative registration for class property/subscript setters (https://github.com/apple/swift/issues/55542). Test: test/AutoDiff/Sema/derivative_attr_type_checking.swift This looks working for structs.
  5. 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
  6. Note: FIXME(TF-1175): Class operands should always be marked active. Test: test/AutoDiff/validation-test/property_wrappers.swift

Forward-mode-related:

  1. Note: TODO(TF-1254): Support forward-mode differentiation and test generated differentials. Test: test/AutoDiff/SILOptimizer/semantic_member_accessors_sil.swift
  2. Note: TODO(TF-1173): Move floating-point mutating operation tests to test/AutoDiff/stdlib/floating_point.swift.gyb when forward-mode differentiation supports inout parameter differentiation. Test: test/AutoDiff/validation-test/inout_parameters.swift
  3. Note: TODO(TF-1254): Support and test forward-mode differentiation. Test: test/AutoDiff/validation-test/property_wrappers.swift
  4. 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:

  1. 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
  2. Note: TODO: Add tests for @differentiable(_linear) functions. Test: test/AutoDiff/IRGen/loadable_by_address.swift

Additional information

No response

kovdan01 commented 1 day ago

Tagging @asl

asl commented 1 day ago

@JaapWijnen @rxwei