Skip to content

[AutoDiff] Simplify logic for checking unmet generic requirements. #27783

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
Oct 19, 2019

Conversation

dan-zheng
Copy link
Contributor

The SubstitutionMap passed to diagnoseUnsatisfiedRequirements
should default to the original function's forwarding substitution map.

Delete the static getSubstitutionMap function, whose purpose is not clear
and is not needed.


Resolves bug exposed during WIP patch for retroactive derivative registration (TF-866).
I couldn't find a corresponding reproducer for testing on current tensorflow branch.

The `SubstitutionMap` passed to `diagnoseUnsatisfiedRequirements`
should default to the original function's forwarding substitution map.

Delete the static `getSubstitutionMap` function, whose purpose is not clear
and is not needed.
@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Oct 18, 2019
@dan-zheng dan-zheng requested review from rxwei and marcrasi October 18, 2019 23:37
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@@ -2536,25 +2536,6 @@ reapplyFunctionConversion(
llvm_unreachable("Unhandled function conversion instruction");
}

static SubstitutionMap getSubstitutionMap(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More context: I added this getSubstitutionMap utility as a hack in #24845, I don't think the old behavior was necessary. The new simpler behavior seems sufficient for now.

Copy link
Contributor

@rxwei rxwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fantastic

@dan-zheng dan-zheng merged commit 7e0faeb into swiftlang:tensorflow Oct 19, 2019
@dan-zheng dan-zheng deleted the diff-transform-patch branch October 19, 2019 00:20
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