Skip to content

[AutoDiff] Differentiation stopped to work for imported protocol methods #84840

@asl

Description

@asl

Description

After #84800 we are not able to produce derivatives for functions with protocol method calls if the derivative is registered for a concrete conformance even if the type is statically known.

See #84800 for the discussion and examples

Reproduction

import _Differentiation

@differentiable(reverse)
func addition(a: SIMD8<Double>, b: SIMD8<Double>) -> SIMD8<Double> {
    a + b
}

Expected behavior

Derivative is produced

Environment

Swift version 6.3-dev (LLVM f3a4f1e56df8f4c, Swift aef0cc9)
Target: arm64-apple-macosx15.0
Build config: +assertions

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutoDiffbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.conformancesFeature → protocol: protocol conformances

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions