Skip to content

Conversation

@shunting314
Copy link
Contributor

@shunting314 shunting314 commented Mar 31, 2022

Stack from ghstack (oldest at bottom):

Merge the code needed for dynamic+ltc integration from the staging branch to the master branch.

Test plan:
Unit test

pytest test_extract_compiled_graph

test thru dynamo

LTC_TS_CUDA=1 time python torchbench.py --speedup-ltc -dcuda --nvfuser --randomize-input --only <model name>

release notes: lazy
topics: not user facing

Differential Revision: D35300646

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 31, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 1397e6a (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).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@shunting314
Copy link
Contributor Author

Previous comments is in #75044

Copy link
Contributor

@wconstab wconstab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending some fixes commented in the previous PR. Also pending if @Krovatkin wants to review.

@shunting314
Copy link
Contributor Author

@shunting314 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@Krovatkin Krovatkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few nits

namespace torch {
namespace lazy {

struct NoGilSection {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be using the pybind11 equivalent : py::gil_scoped_release

@@ -0,0 +1,15 @@
import torch._C._lazy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems a bit arbitrary that these are grouped together under computation. For example, why didn't sync_multi make the cut into this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I don't find a hard rule to decide which APIs goes to which module. This file specifically contains APIs needed to reused a compiled graph so far. sync_multi is a more general API thus I didn't add that here. But it should also look good to put sync_multi here

…ster"


Merge the code needed for dynamic+ltc integration from the staging branch to the master branch.


Test plan:
Unit test
```
pytest test_extract_compiled_graph
```
test thru dynamo
```
LTC_TS_CUDA=1 time python torchbench.py --speedup-ltc -dcuda --nvfuser --randomize-input --only <model name>
```

Differential Revision: [D35300646](https://our.internmc.facebook.com/intern/diff/D35300646)

[ghstack-poisoned]
The text can be processed by tools like dot to be rendered in pdf,png etc."""
return torch._C._lazy._get_tensors_dot(tensors)

def dump_ir(tensors, ir_format):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wconstab I've made the requested changes in this pr.

@shunting314
Copy link
Contributor Author

@shunting314 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

…ster"


Merge the code needed for dynamic+ltc integration from the staging branch to the master branch.


Test plan:
Unit test
```
pytest test_extract_compiled_graph
```
test thru dynamo
```
LTC_TS_CUDA=1 time python torchbench.py --speedup-ltc -dcuda --nvfuser --randomize-input --only <model name>
```

Differential Revision: [D35300646](https://our.internmc.facebook.com/intern/diff/D35300646)

[ghstack-poisoned]
@shunting314
Copy link
Contributor Author

@shunting314 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

…ster"


Merge the code needed for dynamic+ltc integration from the staging branch to the master branch.


Test plan:
Unit test
```
pytest test_extract_compiled_graph
```
test thru dynamo
```
LTC_TS_CUDA=1 time python torchbench.py --speedup-ltc -dcuda --nvfuser --randomize-input --only <model name>
```

Differential Revision: [D35300646](https://our.internmc.facebook.com/intern/diff/D35300646)

[ghstack-poisoned]
shunting314 added a commit that referenced this pull request Apr 1, 2022
@shunting314
Copy link
Contributor Author

@shunting314 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

…ster"


Merge the code needed for dynamic+ltc integration from the staging branch to the master branch.


Test plan:
Unit test
```
pytest test_extract_compiled_graph
```
test thru dynamo
```
LTC_TS_CUDA=1 time python torchbench.py --speedup-ltc -dcuda --nvfuser --randomize-input --only <model name>
```

Differential Revision: [D35300646](https://our.internmc.facebook.com/intern/diff/D35300646)

[ghstack-poisoned]
…ster"


Merge the code needed for dynamic+ltc integration from the staging branch to the master branch.


Test plan:
Unit test
```
pytest test_extract_compiled_graph
```
test thru dynamo
```
LTC_TS_CUDA=1 time python torchbench.py --speedup-ltc -dcuda --nvfuser --randomize-input --only <model name>
```

Differential Revision: [D35300646](https://our.internmc.facebook.com/intern/diff/D35300646)

[ghstack-poisoned]
shunting314 added a commit that referenced this pull request Apr 1, 2022
@shunting314
Copy link
Contributor Author

@shunting314 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Apr 2, 2022
Summary:
Pull Request resolved: #75046

Merge the code needed for dynamic+ltc integration from the staging branch to the master branch.

Test Plan:
Unit test
```
pytest test_extract_compiled_graph
```
test thru dynamo
```
LTC_TS_CUDA=1 time python torchbench.py --speedup-ltc -dcuda --nvfuser --randomize-input --only <model name>
```

Reviewed By: alanwaketan

Differential Revision: D35300646

Pulled By: shunting314

fbshipit-source-id: 09ed20d3bb8ef80e4b93ba87ea3356a07d2dccdb
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2022

Hey @shunting314.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@facebook-github-bot facebook-github-bot deleted the gh/shunting314/19/head branch April 5, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants