Move deprecation warning out of generated code into python_arg_parser.#32907
Closed
bhosmer wants to merge 2 commits intogh/bhosmer/7/basefrom
Closed
Move deprecation warning out of generated code into python_arg_parser.#32907bhosmer wants to merge 2 commits intogh/bhosmer/7/basefrom
bhosmer wants to merge 2 commits intogh/bhosmer/7/basefrom
Conversation
All op-specific information used in this logic was available to the parser itself, so the check can be done in that context, no codegen needed. Saves like ~275K binary size on mac: ``` -rwxr-xr-x 1 bhosmer 1876110778 16502064 Feb 1 00:43 torch/lib/libtorch_python.dylib -rwxr-xr-x 1 bhosmer 1876110778 16247888 Feb 1 00:44 torch/lib/libtorch_python.dylib ``` [ghstack-poisoned]
…_arg_parser." All op-specific information used in this logic was available to the parser itself, so the check can be done in that context, no codegen needed. No change in the warning behavior itself, mod minor formatting tweak - passes existing tests. Saves like ~275K binary size on mac: ``` -rwxr-xr-x 1 bhosmer 1876110778 16502064 Feb 1 00:43 torch/lib/libtorch_python.dylib -rwxr-xr-x 1 bhosmer 1876110778 16247888 Feb 1 00:44 torch/lib/libtorch_python.dylib ``` [codegen diff](bhosmer/scratch@deprecation_warning_before...deprecation_warning_after) More important than the size savings is the minimization of codegen. Ideally the generated artifact should express distinctive per-op properties in as minimal a form as practically possible - e.g. here instead of generating check-and-warn behavior into every binding, we generate only the data that triggers the behavior in the parser. (And actually we were generating it already.) Differential Revision: [D19679928](https://our.internmc.facebook.com/intern/diff/D19679928) [ghstack-poisoned]
bhosmer
pushed a commit
that referenced
this pull request
Feb 1, 2020
All op-specific information used in this logic was available to the parser itself, so the check can be done in that context, no codegen needed. Saves like ~275K binary size on mac: ``` -rwxr-xr-x 1 bhosmer 1876110778 16502064 Feb 1 00:43 torch/lib/libtorch_python.dylib -rwxr-xr-x 1 bhosmer 1876110778 16247888 Feb 1 00:44 torch/lib/libtorch_python.dylib ``` ghstack-source-id: 82e7ad6 Pull Request resolved: #32907
gchanan
approved these changes
Feb 3, 2020
Contributor
|
I don't know if the clang-tidy errors are real. |
Contributor
Contributor
BowenBao
pushed a commit
to BowenBao/pytorch
that referenced
this pull request
Feb 12, 2020
pytorch#32907) Summary: Pull Request resolved: pytorch#32907 All op-specific information used in this logic was available to the parser itself, so the check can be done in that context, no codegen needed. No change in the warning behavior itself, mod minor formatting tweak - passes existing tests. Saves like ~275K binary size on mac: ``` -rwxr-xr-x 1 bhosmer 1876110778 16502064 Feb 1 00:43 torch/lib/libtorch_python.dylib -rwxr-xr-x 1 bhosmer 1876110778 16247888 Feb 1 00:44 torch/lib/libtorch_python.dylib ``` [codegen diff](bhosmer/scratch@deprecation_warning_before...deprecation_warning_after) More important than the size savings is the minimization of codegen. Ideally the generated artifact should express distinctive per-op properties in as minimal a form as practically possible - e.g. here instead of generating check-and-warn behavior into every binding, we generate only the data that triggers the behavior in the parser. (And actually we were generating it already.) Test Plan: Imported from OSS Differential Revision: D19679928 Pulled By: bhosmer fbshipit-source-id: cf0140573118430720c6b797c762fe5be98acd86
ttumiel
pushed a commit
to ttumiel/pytorch
that referenced
this pull request
Mar 4, 2020
pytorch#32907) Summary: Pull Request resolved: pytorch#32907 All op-specific information used in this logic was available to the parser itself, so the check can be done in that context, no codegen needed. No change in the warning behavior itself, mod minor formatting tweak - passes existing tests. Saves like ~275K binary size on mac: ``` -rwxr-xr-x 1 bhosmer 1876110778 16502064 Feb 1 00:43 torch/lib/libtorch_python.dylib -rwxr-xr-x 1 bhosmer 1876110778 16247888 Feb 1 00:44 torch/lib/libtorch_python.dylib ``` [codegen diff](bhosmer/scratch@deprecation_warning_before...deprecation_warning_after) More important than the size savings is the minimization of codegen. Ideally the generated artifact should express distinctive per-op properties in as minimal a form as practically possible - e.g. here instead of generating check-and-warn behavior into every binding, we generate only the data that triggers the behavior in the parser. (And actually we were generating it already.) Test Plan: Imported from OSS Differential Revision: D19679928 Pulled By: bhosmer fbshipit-source-id: cf0140573118430720c6b797c762fe5be98acd86
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:
All op-specific information used in this logic was available to the
parser itself, so the check can be done in that context, no codegen
needed.
No change in the warning behavior itself, mod minor formatting tweak -
passes existing tests. Saves like ~275K binary size on mac:
codegen diff
More important than the size savings is the minimization of codegen. Ideally the generated artifact should express distinctive per-op properties in as minimal a form as practically possible - e.g. here instead of generating check-and-warn behavior into every binding, we generate only the data that triggers the behavior in the parser. (And actually we were generating it already.)
Differential Revision: D19679928