Skip to content

Conversation

d1jang
Copy link
Contributor

@d1jang d1jang commented Sep 16, 2021

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

@facebook-github-bot facebook-github-bot added oncall: jit Add this issue/PR to JIT oncall triage queue cla signed labels Sep 16, 2021
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Sep 16, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As 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.

Click here to manually regenerate this comment.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D30983292

@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #65123 (401a6a5) into master (873255c) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            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     

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ae00075.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed fb-exported Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants