-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Static Runtime] Move MemoryPlanner out into memory_planner.cpp (#65011) #65123
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
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 401a6a5 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
This pull request was exported from Phabricator. Differential Revision: D30983292 |
This pull request was exported from Phabricator. Differential Revision: D30983292 |
50f8aa0
to
925c508
Compare
This pull request was exported from Phabricator. Differential Revision: D30983292 |
925c508
to
e195ff4
Compare
This pull request was exported from Phabricator. Differential Revision: D30983292 |
e195ff4
to
db38905
Compare
This pull request was exported from Phabricator. Differential Revision: D30983292 |
db38905
to
42f37b3
Compare
This pull request was exported from Phabricator. Differential Revision: D30983292 |
42f37b3
to
467dc72
Compare
This pull request was exported from Phabricator. Differential Revision: D30983292 |
467dc72
to
48f14a1
Compare
…rch#65123) Summary: Pull Request resolved: pytorch#65123 This change re-reverts D30883290 (pytorch@0e11454). D30883290 (pytorch@0e11454) broke the OSS build since the change in this change implicitly removed the default move constructor of `StaticRuntime`. ``` ep 15 15:39:57 /var/lib/jenkins/workspace/benchmarks/static_runtime/deep_wide_pt_bench.cc:95:10: error: call to implicitly-deleted copy constructor of 'torch::jit::StaticRuntime' Sep 15 15:39:57 return torch::jit::StaticRuntime(*smod); Sep 15 15:39:57 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sep 15 15:39:57 /var/lib/jenkins/workspace/torch/csrc/jit/runtime/static/impl.h:321:34: note: copy constructor of 'StaticRuntime' is implicitly deleted because field 'planner_' has a deleted copy constructor Sep 15 15:39:57 std::unique_ptr<MemoryPlanner> planner_; Sep 15 15:39:57 ^ Sep 15 15:39:57 /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/unique_ptr.h:356:7: note: 'unique_ptr' has been explicitly marked deleted here Sep 15 15:39:57 unique_ptr(const unique_ptr&) = delete; Sep 15 15:39:57 ^ Sep 15 15:39:57 /var/lib/jenkins/workspace/benchmarks/static_runtime/deep_wide_pt_bench.cc:99:9: error: call to implicitly-deleted copy constructor of 'torch::jit::StaticRuntime' Sep 15 15:39:57 auto sr = getStaticRuntime(); Sep 15 15:39:57 ^ ~~~~~~~~~~~~~~~~~~ Sep 15 15:39:57 /var/lib/jenkins/workspace/torch/csrc/jit/runtime/static/impl.h:321:34: note: copy constructor of 'StaticRuntime' is implicitly deleted because field 'planner_' has a deleted copy constructor Sep 15 15:39:57 std::unique_ptr<MemoryPlanner> planner_; Sep 15 15:39:57 ^ Sep 15 15:39:57 /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/unique_ptr.h:356:7: note: 'unique_ptr' has been explicitly marked deleted here Sep 15 15:39:57 unique_ptr(const unique_ptr&) = delete; Sep 15 15:39:57 ^ Sep 15 15:39:57 2 errors generated. ``` This change fixes the issue by explicitly defining the default move constructor (courtesy of mikeiovine). Original Summary: This change moves `MemoryPlanner` out of impl.cpp into memory_planner.cpp. `MemoryPlanner` performs an independent sub-task of static analysis of a graph, and creating memory planning, and allocating/deallocating managed Tensors. This change will reduce merge conflicts as I work on MemoryPlanner more actively for output Tensor support. Test Plan: - Confirm that OSS build went well (See External Tests section). Differential Revision: D30983292 fbshipit-source-id: e43790d588d993f5a8df3193820f98ef5a81c094
This pull request was exported from Phabricator. Differential Revision: D30983292 |
48f14a1
to
401a6a5
Compare
Codecov Report
@@ Coverage Diff @@
## master #65123 +/- ##
==========================================
- Coverage 66.37% 66.37% -0.01%
==========================================
Files 732 732
Lines 93616 93616
==========================================
- Hits 62135 62134 -1
- Misses 31481 31482 +1 |
This pull request has been merged in ae00075. |
Summary:
Pull Request resolved: #65011
This change moves
MemoryPlanner
out of impl.cpp into memory_planner.cpp.MemoryPlanner
performs an independent sub-task of static analysis of a graph, and creating memory planning, and allocating/deallocating managed Tensors.This change will reduce merge conflicts as I work on MemoryPlanner more actively for output Tensor support.
Test Plan: N/A
Differential Revision: D30983292