8000 [JIT] parse prim::Constant[value=annotate()] and prim::Constant[value={0}] by davidberard98 · Pull Request #76875 · pytorch/pytorch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[JIT] parse prim::Constant[value=annotate()] and prim::Constant[value={0}] #76875

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

Closed

Conversation

davidberard98
Copy link
Contributor
@davidberard98 davidberard98 commented May 5, 2022

Stack from ghstack:

irparser previously didn't support these, which would cause failures in
log_extract.py

Differential Revision: D36156699

…={0}]

irparser previously didn't support these, which would cause failures in
log_extract.py

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor
facebook-github-bot commented May 5, 2022

🔗 Helpful links

❌ 1 New Failures

As of commit f4d51a9 (more details on the Dr. CI page):

Expand to see more
  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages

See GitHub Actions build pull / pytorch-xla-linux-bionic-py3.7-clang8 / test (xla, 1, 1, linux.2xlarge) (1/1)

Step: "Download build artifacts" (full log | diagnosis details | 🔁 rerun)

2022-05-06T18:33:27.9490483Z ##[error]Process completed with exit code 9.
2022-05-06T18:33:27.9284295Z Artifact download has finished successfully
2022-05-06T18:33:27.9406006Z ##[group]Run unzip -o artifacts.zip
2022-05-06T18:33:27.9406239Z �[36;1munzip -o artifacts.zip�[0m
2022-05-06T18:33:27.9417366Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2022-05-06T18:33:27.9417586Z env:
2022-05-06T18:33:27.9417746Z   IN_CI: 1
2022-05-06T18:33:27.9417893Z   IS_GHA: 1
2022-05-06T18:33:27.9418073Z   GIT_DEFAULT_BRANCH: master
2022-05-06T18:33:27.9418260Z ##[endgroup]
2022-05-06T18:33:27.9484629Z unzip:  cannot find or open artifacts.zip, artifacts.zip.zip or artifacts.zip.ZIP.
2022-05-06T18:33:27.9490483Z ##[error]Process completed with exit code 9.
2022-05-06T18:33:27.9605254Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-06T18:33:27.9605496Z with:
2022-05-06T18:33:27.9605808Z   github-token: ***
2022-05-06T18:33:27.9605976Z env:
2022-05-06T18:33:27.9606117Z   IN_CI: 1
2022-05-06T18:33:27.9606274Z   IS_GHA: 1
2022-05-06T18:33:27.9606451Z   GIT_DEFAULT_BRANCH: master
2022-05-06T18:33:27.9606620Z ##[endgroup]
2022-05-06T18:33:27.9682490Z ##[group]Run nick-fields/retry@71062288b76e2b6214ebde0e673ce0de1755740a
2022-05-06T18:33:27.9682726Z with:

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.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label May 5, 2022
…stant[value={0}]"

irparser previously didn't support these, which would cause failures in
log_extract.py

[ghstack-poisoned]
@davidberard98
Copy link
Contributor Author

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

…stant[value={0}]"

irparser previously didn't support these, which would cause failures in
log_extract.py

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

[ghstack-poisoned]
…stant[value={0}]"

irparser previously didn't support these, which would cause failures in
log_extract.py

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

[ghstack-poisoned]
davidberard98 added a commit that referenced this pull request May 5, 2022
…={0}]

irparser previously didn't support these, which would cause failures in
log_extract.py

ghstack-source-id: 9e1118f
Pull Request resolved: #76875
@davidberard98
Copy link
Contributor Author

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

Copy link
Contributor
@eellison eellison left a comment

Choose a reason for hiding this comment

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

looking good, but a couple comments

graph = torch._C.parse_ir(ir, True)
func = torch._C._create_function_from_graph("forward", graph)
ret = func()
self.assertTrue(ret.numel() == 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you also check that len(ret.size() == 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually it's ret.size() == 1 for this tensor - added a check

%3 : int[] = prim::Constant[value=annotate(List[int], [])]()
return (%3)
"""
graph = torch._C.parse_ir(ir, True)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, check result somehow ? maybe with

%1 : bool = prim::isinstance[types=[int[]]](%3)
return (%1)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm that didn't work because... it can't parse List[int] 😄

I'm just checking == [] right now, lmk if you have another suggestion on how to do this

<< "Unexpected annotation (only List and Dict can be parsed)";
}
L.next();
// use the profiling annotation instead of the `annotate()` type.
Copy link
Contributor
@eellison eellison May 5, 2022

Choose a reason for hiding this comment

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

profiling is too specific, since types could come elsewhere. I would say something like ignore the annotations on the IValue constants, and recover type from the Node output

…stant[value={0}]"

irparser previously didn't support these, which would cause failures in
log_extract.py

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

[ghstack-poisoned]
davidberard98 added a commit that referenced this pull request May 6, 2022
…={0}]

irparser previously didn't support these, which would cause failures in
log_extract.py

ghstack-source-id: 3d62afd
Pull Request resolved: #76875
@davidberard98
Copy link
Contributor Author

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

@davidberard98 davidberard98 requested a review from eellison May 6, 2022 02:14
Copy link
Contributor
@eellison eellison left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor
@tugsbayasgalan tugsbayasgalan left a comment

Choose a reason for hiding this comment

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

LGTM!

@davidberard98
Copy link
Contributor Author

@pytorchbot merge this please

@davidberard98 davidberard98 added the topic: not user facing topic category label May 6, 2022
@facebook-github-bot facebook-github-bot deleted the gh/davidberard98/106/head branch May 10, 2022 14:16
@janeyx99
Copy link
Contributor

@pytorchbot revert this pls

It broke Torchvision per the linked issue.

pytorchmergebot added a commit that referenced this pull request May 11, 2022
…nt[value={0}]"

This reverts commit 31d3ce7.

Reverted #76875 on behalf of https://github.com/janeyx99
davidberard98 added a commit that referenced this pull request May 12, 2022
…t[value={0}]"

Retry of #76875. It was reverted
due to torchvision failures, but it turned out that the failures were
caused by a different PR.

irparser previously didn't support these, which would cause failures in
log_extract.py

[ghstack-poisoned]
davidberard98 added a commit that referenced this pull request May 12, 2022
…t[value={0}]"

Retry of #76875. It was reverted
due to torchvision failures, but it turned out that the failures were
caused by a different PR.

irparser previously didn't support these, which would cause failures in
log_extract.py

ghstack-source-id: b54dce9
Pull Request resolved: #77377
pytorchmergebot pushed a commit that referenced this pull request May 13, 2022
…t[value={0}]"

Retry of #76875. It was reverted
due to torchvision failures, but it turned out that the failures were
caused by a different PR.

irparser previously didn't support these, which would cause failures in
log_extract.py

Pull Request resolved: #77377

Approved by: https://github.com/datumbox
facebook-github-bot pushed a commit that referenced this pull request May 13, 2022
…={0}] (#76875)

Summary:
irparser previously didn't support these, which would cause failures in
log_extract.py

Pull Request resolved: #76875

Approved by: https://github.com/eellison, https://github.com/tugsbayasgalan

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/31d3ce70005251860d78d3994b73894c14b067c5

Reviewed By: eellison, tugsbayasgalan

Differential Revision: D36156699

fbshipit-source-id: 501df8f0f7744c55ce572468e38f61367108131a
facebook-github-bot pushed a commit that referenced this pull request May 13, 2022
…nt[value={0}]"

Summary:
This reverts commit 31d3ce7.

Reverted #76875 on behalf of https://github.com/janeyx99

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/2083b16f68963e563c6fbf6bf1084e78a7f66139

Reviewed By: atalman

Differential Revision: D36322437

Pulled By: atalman

fbshipit-source-id: 2d48ffa603e5b1f85f2bc493741b3279af474a96
facebook-github-bot pushed a commit that referenced this pull request May 15, 2022
…t[value={0}]" (#77377)

Summary:
Retry of #76875. It was reverted
due to torchvision failures, but it turned out that the failures were
caused by a different PR.

irparser previously didn't support these, which would cause failures in
log_extract.py

Pull Request resolved: #77377

Approved by: https://github.com/datumbox

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/fa44e165ff5f616ae69c0d8dbca757f8d8a9159f

Reviewed By: atalman

Differential Revision: D36386459

Pulled By: davidberard98

fbshipit-source-id: b2ada187e94b8280020f4454e44981f6e45922e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed oncall: jit Add this issue/PR to JIT oncall triage queue Reverted topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[JIT] cannot parse IR for "prim::Constant[value=annotate(List[int], []))]"
6 participants
0