Skip to content

[AutoDiff] NFC: gardening. #28251

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 2 commits into from
Nov 14, 2019
Merged

Conversation

dan-zheng
Copy link
Contributor

Improve documentation comments and differentiation debug output.
Add correctness assertions.
Wrap lines to 80 columns.

Change the DenseMap key type for LinearMapInfo::linearMapFieldMap
from SILInstruction * to ApplyInst *, since stored properties
(struct_extract instructions) cannot have custom derivatives after
#25151.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Nov 14, 2019
@@ -5971,7 +5979,7 @@ class PullbackEmitter final : public SILInstructionVisitor<PullbackEmitter> {
auto insertion = valueMap.try_emplace({origBB, originalValue},
adjointValue);
LLVM_DEBUG(getADDebugStream()
<< "The existing adjoint value will be replaced: "
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: the previous message made it sound like the "existing (old) adjoint value" is displayed instead of the new value.

Improve documentation comments and differentiation debug output.
Add correctness assertions.
Wrap lines to 80 columns.

Change the `DenseMap` key type for `LinearMapInfo::linearMapFieldMap`
from `SILInstruction *` to `ApplyInst *`, since stored properties
(`struct_extract` instructions) cannot have custom derivatives.
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng dan-zheng merged commit d89e9d1 into swiftlang:tensorflow Nov 14, 2019
@dan-zheng dan-zheng deleted the autodiff-gardening branch November 14, 2019 07:06
bgogul pushed a commit that referenced this pull request Nov 19, 2019
Improve documentation comments and differentiation debug output.
Add correctness assertions.
Wrap lines to 80 columns.

Change the `DenseMap` key type for `LinearMapInfo::linearMapFieldMap`
from `SILInstruction *` to `ApplyInst *`, since stored properties
(`struct_extract` instructions) cannot have custom derivatives.
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