Skip to content

[AutoDiff] Canonicalize JVP/VJP types to re-enable LoadableByAddress.#27298

Closed
dan-zheng wants to merge 9 commits intotensorflowfrom
reenable-loadable-by-address
Closed

[AutoDiff] Canonicalize JVP/VJP types to re-enable LoadableByAddress.#27298
dan-zheng wants to merge 9 commits intotensorflowfrom
reenable-loadable-by-address

Conversation

@dan-zheng
Copy link
Contributor

Canonicalize JVP/VJP types so the returned original result is always indirect.

This makes it so JVP/VJP type no longer depends on the abstraction of the
original function type, making it possible to re-enable LoadableByAddress.

Resolves TF-626.


Note: this PR depends on #26709.

Canonicalize JVPs/VJPs to return maximally abstracted linear map functions
with `@in_guaranteed` parameters and an `@out` result.

This is a necessary step towards re-enabling LoadableByAddress:
linear map type is no longer computed based on the original function type.

See TF-11 for more info regarding LoadableByAddress.
See TF-625 for more info regarding maximally abstracted linear maps.
- Change differential generation to use only tangent buffers.
- Change pullback visitors to use only adjoint buffers.
- Change adjoint of active value propagation to use only adjoint buffers.
- Mark all tangent/adjoint value helpers as `[[deprecated]]`.
  - They are not deleted because helpers may become useful after
    SIL opaque values are introduced.
Will re-add in follow-up for separation of concerns.
Canonicalize JVP/VJP types so the returned original result is always indirect.

This makes it so JVP/VJP type no longer depends on the abstraction of the
original function type, making it possible to re-enable LoadableByAddress.

Resolves TF-626.
@dan-zheng
Copy link
Contributor Author

A less invasive approach for re-enabling LoadableByAddress was found: #27923

Maximal indirection will not be pursued further: the differentiation transform should not be forced to generate maximally indirect code to workaround issues caused by LoadableByAddress.

@dan-zheng dan-zheng closed this Dec 3, 2019
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.

1 participant