-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove lowered execution #21674
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
Remove lowered execution #21674
Conversation
Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object).
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
| if(const auto& sub = module.find_module(field)) { | ||
| gatherParamsFirstClass(*sub, u.user->output(), params); | ||
| } else if(script::Slot* slot = module.find_parameter(field)) { | ||
| if (const auto &sub = module.find_module(field)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like some weird autoformatting going on
| } | ||
| const std::string& name() const { | ||
| return name_; | ||
| const std::string& field_name() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field_name is a little confusing—unqualified_name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are now two names, the name of the Class and the name of the module as a member of a parent module. We still rely on this "field_name" in a few places and it is never qualified. There is a comment that explains this. My hope is that the "Module because a view patch" simply removes it.
| // Create a type representing a Module, | ||
| // These do not have methods, and are not globally registered | ||
| static ClassTypePtr createModuleType(std::shared_ptr<CompilationUnit> module); | ||
| std::shared_ptr<CompilationUnit> cu, bool is_module = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is_module flag is a suspicious to me, since it implies that we are branching somewhere on whether something is a module (and so modules are not quite first class actually)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, seems like it is used for ONNX…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed in person: ModuleType will be introduced as subtype of ClassType in a future comment. This means that the ClassType has additional module-like behavior (e.g. it has a list of "parameter" objects)
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Remove lowered execution Summary: First class modules can now run on our entire test suite, and benchmarks indicate there is no obvious performance regressions. This PR removes lowered execution and cleans up dead code without changing the Module API. A followup PR further simplifies the Module API now that methods are simply a pair of (function, method_object). gh-metadata: pytorch pytorch 21674 gh/zdevito/63/head
Summary: Pull Request resolved: pytorch/pytorch#21674 ghimport-source-id: b8e27f0ce9b8b362daf73556ee67457fb5355062 Reviewed By: eellison Differential Revision: D15777726 Pulled By: zdevito fbshipit-source-id: 718ac676c9a1bcf99b856862fd29631d825645da
Stack from ghstack:
Summary: First class modules can now run on our entire test suite,
and benchmarks indicate there is no obvious performance regressions.
This PR removes lowered execution and cleans up dead code without
changing the Module API. A followup PR further simplifies the Module API
now that methods are simply a pair of (function, method_object).
Differential Revision: D15777726