Skip to content

[AutoDiff] Emit SIL diff witnesses into original function's IRGenModule. #28237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

dan-zheng
Copy link
Contributor

@dan-zheng dan-zheng commented Nov 13, 2019

The differentiation transform does not yet canonicalize differentiability
witnesses so that they always have JVP/VJP functions. TF-894 tracks this.

Until then, emit SIL differentiability witness into the IRGenModule for
the original function. This significance of this is unclear;
IRGenerator::getGenModule seems relevant only for multi-threaded
compilation.

Resolves TF-960: crash when SILDifferentiabilityWitness::getVJP is null.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Nov 13, 2019
@dan-zheng dan-zheng requested a review from marcrasi November 13, 2019 19:57
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

The differentiation transform does not yet canonicalize differentiability
witnesses so that they always have JVP/VJP functions. TF-894 tracks this.

Until then, emit SIL differentiability witness into the IRGenModule for
the original function. This significance of this is unclear;
`IRGenerator::getGenModule` seems relevant only for multi-threaded
compilation.

Resolves TF-960: crash when `SILDifferentiabilityWitness::getVJP` is null.
@dan-zheng dan-zheng changed the title [AutoDiff] Skip IRGen for uncanonicalized differentiability witnesses. [AutoDiff] Emit SIL diff witnesses into original function's IRGenModule. Nov 13, 2019
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow macOS

@dan-zheng dan-zheng merged this pull request into swiftlang:tensorflow Nov 14, 2019
@dan-zheng dan-zheng deleted the TF-960 branch November 14, 2019 01:58
dan-zheng added a commit that referenced this pull request Nov 14, 2019
…le. (#28237)

The differentiation transform does not yet canonicalize differentiability
witnesses so that they always have JVP/VJP functions. TF-894 tracks this.

Until then, emit SIL differentiability witness into the IRGenModule for
the original function. The significance of this is unclear;
`IRGenerator::getGenModule` seems relevant only for multi-threaded
compilation.

Resolves TF-960: crash when `SILDifferentiabilityWitness::getVJP` is null.
bgogul pushed a commit that referenced this pull request Nov 19, 2019
…le. (#28237)

The differentiation transform does not yet canonicalize differentiability
witnesses so that they always have JVP/VJP functions. TF-894 tracks this.

Until then, emit SIL differentiability witness into the IRGenModule for
the original function. The significance of this is unclear;
`IRGenerator::getGenModule` seems relevant only for multi-threaded
compilation.

Resolves TF-960: crash when `SILDifferentiabilityWitness::getVJP` is null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tensorflow This is for "tensorflow" branch PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants