[pytorch][mobile] remove backward functions from jit-op-registry for mobile build#26783
[pytorch][mobile] remove backward functions from jit-op-registry for mobile build#26783ljk53 merged 3 commits intogh/ljk53/58/basefrom
Conversation
…mobile build Summary: Add codegen option to remove backward ops from jit-op-registry as they are not likely to be used for inference only mobile build. Measured ARM-v7 AAR build size change: 5,804,182 -> 5,331,219. Test Plan: - build and integrate with demo app; [ghstack-poisoned]
|
Recreate #26657 - that PR was marked as merged for some reason. |
…gistry for mobile build" Summary: Add codegen option to remove backward ops from jit-op-registry as they are not likely to be used for inference only mobile build. Measured ARM-v7 AAR build size change: 5,804,182 -> 5,331,219. Test Plan: - build and integrate with demo app; [ghstack-poisoned]
…gistry for mobile build" Summary: Add codegen option to remove backward ops from jit-op-registry as they are not likely to be used for inference only mobile build. Measured ARM-v7 AAR build size change: 5,804,182 -> 5,331,219. Test Plan: - build and integrate with demo app; [ghstack-poisoned]
| return decl['name'].endswith('_out') | ||
|
|
||
|
|
||
| # Copied from ..autograd.gen_python_functions.SKIP_PYTHON_BINDINGS |
There was a problem hiding this comment.
@zdevito is there a reason to bind other skipped python bindings for JIT? Can we safely skip all of them by default?
There was a problem hiding this comment.
There's symbolic differentiation support in JIT. It'd append IR for backwards directly to the graph. For those cases we need to have backwards ops registered and runnable. (at least that's my understanding)
| return decl['name'].endswith('_out') | ||
|
|
||
|
|
||
| # Copied from ..autograd.gen_python_functions.SKIP_PYTHON_BINDINGS |
There was a problem hiding this comment.
There's symbolic differentiation support in JIT. It'd append IR for backwards directly to the graph. For those cases we need to have backwards ops registered and runnable. (at least that's my understanding)
…mobile build Summary: Add codegen option to remove backward ops from jit-op-registry as they are not likely to be used for inference only mobile build. Measured ARM-v7 AAR build size change: 5,804,182 -> 5,331,219. Test Plan: - build and integrate with demo app; ghstack-source-id: 6716a80 Pull Request resolved: #26783
|
ahh... this PR got marked as merged again.. I'll recreate. |
Stack from ghstack:
Summary:
Add codegen option to remove backward ops from jit-op-registry as they are not
likely to be used for inference only mobile build.
Measured ARM-v7 AAR build size change: 5,804,182 -> 5,331,219.
Test Plan:
Differential Revision: D17570054