[pytorch][mobile] gate static aten registerer with USE_STATIC_DISPATCH#25815
Closed
ljk53 wants to merge 4 commits intogh/ljk53/35/basefrom
Closed
[pytorch][mobile] gate static aten registerer with USE_STATIC_DISPATCH#25815ljk53 wants to merge 4 commits intogh/ljk53/35/basefrom
ljk53 wants to merge 4 commits intogh/ljk53/35/basefrom
Conversation
Summary: Don't need call these global registerers when USE_STATIC_DISPATCH is set as they will keep all aten functions at link time. Should solely rely on jit/generated/register_aten_ops* to keep "interface" aten functions (which are directly called from JIT), and rely on STATIC_DISPATCH + linker to keep all other aten functions that are transitively needed by the "interface" functions. Test Plan: - build and run in the demo app; - with stacked diff to shrink registered "interface" functions, linker can strip out unused aten implementations;
This was referenced Sep 7, 2019
Closed
ezyang
approved these changes
Sep 9, 2019
…TIC_DISPATCH" Summary: Don't need call these global registerers when USE_STATIC_DISPATCH is set as they will keep all aten functions at link time. Should solely rely on jit/generated/register_aten_ops* to keep "interface" aten functions (which are directly called from JIT), and rely on STATIC_DISPATCH + linker to keep all other aten functions that are transitively needed by the "interface" functions. Test Plan: - build and run in the demo app; - with stacked diff to shrink registered "interface" functions, linker can strip out unused aten implementations; Pull Request resolved: #25815 Differential Revision: [D17247236](https://our.internmc.facebook.com/intern/diff/D17247236)
smessmer
requested changes
Sep 10, 2019
Contributor
smessmer
left a comment
There was a problem hiding this comment.
I don't think relying on jit/generated/register_aten_ops* will work. Let's talk about this offline.
smessmer
approved these changes
Sep 10, 2019
Contributor
smessmer
left a comment
There was a problem hiding this comment.
re-accepting, this diff by itself is fine, but we should talk about the registration thing ^^
…TIC_DISPATCH" Summary: Don't need call these global registerers when USE_STATIC_DISPATCH is set as they will keep all aten functions at link time. Should solely rely on jit/generated/register_aten_ops* to keep "interface" aten functions (which are directly called from JIT), and rely on STATIC_DISPATCH + linker to keep all other aten functions that are transitively needed by the "interface" functions. Test Plan: - build and run in the demo app; - with stacked diff to shrink registered "interface" functions, linker can strip out unused aten implementations; Pull Request resolved: #25815 Differential Revision: [D17247236](https://our.internmc.facebook.com/intern/diff/D17247236)
This was referenced Sep 10, 2019
…TIC_DISPATCH" Summary: Don't need call these global registerers when USE_STATIC_DISPATCH is set as they will keep all aten functions at link time. Should solely rely on jit/generated/register_aten_ops* to keep "interface" aten functions (which are directly called from JIT), and rely on STATIC_DISPATCH + linker to keep all other aten functions that are transitively needed by the "interface" functions. Test Plan: - build and run in the demo app; - with stacked diff to shrink registered "interface" functions, linker can strip out unused aten implementations; Pull Request resolved: #25815 Differential Revision: [D17247236](https://our.internmc.facebook.com/intern/diff/D17247236)
Contributor
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Sep 10, 2019
Summary: Pull Request resolved: pytorch/pytorch#25815 Don't need call these global registerers when USE_STATIC_DISPATCH is set as they will keep all aten functions at link time. Should solely rely on jit/generated/register_aten_ops* to keep "interface" aten functions (which are directly called from JIT), and rely on STATIC_DISPATCH + linker to keep all other aten functions that are transitively needed by the "interface" functions. Test Plan: - build and run in the demo app; - with stacked diff to shrink registered "interface" functions, linker can strip out unused aten implementations; Differential Revision: D17247236 Pulled By: ljk53 fbshipit-source-id: 1feb5fbb8b9cfa057b9ba8bf3f2967f40980c917
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Summary:
Don't need call these global registerers when USE_STATIC_DISPATCH is
set as they will keep all aten functions at link time.
Should solely rely on jit/generated/register_aten_ops* to keep "interface"
aten functions (which are directly called from JIT), and rely on
STATIC_DISPATCH + linker to keep all other aten functions that are
transitively needed by the "interface" functions.
Test Plan:
can strip out unused aten implementations;
Pull Request resolved: #25815
Differential Revision: D17247236