Skip to content

Conversation

@dan-zheng
Copy link
Contributor

In AbstractFunctionDecl::getDerivativeFunctionConfigurations, type-check @differentiable attributes.

This is important to populate derivative configurations for original functions in other files. Otherwise, they will incorrectly be diagnosed with:

cannot differentiate functions that have not been marked '@differentiable' and that are defined in other files

Resolves TF-1271.

Exposes TF-1272: fix derivative configurations for cross-file @derivative attributes. This is a more difficult issue.

In `AbstractFunctionDecl::getDerivativeFunctionConfigurations`, type-check
`@differentiable` attributes. This is important to populate derivative
configurations for original functions in other files.

Resolves TF-1271.

Exposes TF-1272: fix derivative configurations for cross-file `@derivative`
attributes. This is a more difficult issue.
@dan-zheng dan-zheng requested review from marcrasi and rxwei May 4, 2020 02:58
@dan-zheng
Copy link
Contributor Author

@swift-ci Please smoke test

@dan-zheng
Copy link
Contributor Author

macOS CI failed on a LLDB test:

20:24:09 Failing Tests (1):
20:24:09     lldb-shell :: Reproducer/Swift/TestBridging.test

Retriggering to see if it's reproducible.
@swift-ci Please smoke test macOS

@dan-zheng
Copy link
Contributor Author

@swift-ci Please smoke test

@dan-zheng dan-zheng merged commit 738ef73 into swiftlang:master May 4, 2020
@dan-zheng dan-zheng deleted the cross-file-derivative-config branch May 4, 2020 07:44
dan-zheng added a commit that referenced this pull request May 4, 2020
…#31524)

In `AbstractFunctionDecl::getDerivativeFunctionConfigurations`, type-check
`@differentiable` attributes. This is important to populate derivative
configurations for original functions in other files.

Resolves TF-1271.

Exposes TF-1272: fix derivative configurations for cross-file `@derivative`
attributes. This is a more difficult issue.
atrick added a commit to atrick/swift that referenced this pull request May 4, 2020
https://bugs.swift.org/browse/SR-12732
3 AutoDiff test failures: crashing in SIL verification

Failing Tests (3):
06:26:12     Swift(macosx-x86_64) :: AutoDiff/validation-test/derivative_registration.swift
06:26:12     Swift(macosx-x86_64) :: AutoDiff/validation-test/custom_derivatives.swift
06:26:12     Swift(macosx-x86_64) :: AutoDiff/stdlib/derivative_customization.swift

Possibly from:

commit 738ef73
Author: Dan Zheng <[email protected]>
Date:   Mon May 4 00:44:48 2020 -0700

    [AutoDiff] Fix `@differentiable` attribute derivative configurations. (swiftlang#31524)
rxwei pushed a commit to rxwei/swift that referenced this pull request Jun 3, 2020
…swiftlang#31524)

In `AbstractFunctionDecl::getDerivativeFunctionConfigurations`, type-check
`@differentiable` attributes. This is important to populate derivative
configurations for original functions in other files.

Resolves TF-1271.

Exposes TF-1272: fix derivative configurations for cross-file `@derivative`
attributes. This is a more difficult issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants