KEMBAR78
OpInfo for `torch.nn.functional.normalize` by krshrimali · Pull Request #62635 · pytorch/pytorch · GitHub
Skip to content

Conversation

@krshrimali
Copy link
Contributor

@krshrimali krshrimali commented Aug 3, 2021

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 3, 2021

🔗 Helpful links

💊 CI failures summary and remediations

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


None of the CI failures appear to be your fault 💚



❄️ 1 failure tentatively classified as flaky

but reruns have not yet been triggered to confirm:

See CircleCI build pytorch_linux_bionic_cuda10_2_cudnn7_py3_9_gcc7_test1 (1/1)

Step: "Set Up CI Environment After attach_workspace" (full log | diagnosis details | 🔁 rerun) ❄️

E: Failed to fetch http://mirrors.ubuntu.com/mi...ubuntu.com:80 (91.189.89.32), connection timed out

0% [Working]
            
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/t/tcl8.6/libtcl8.6_8.6.10+dfsg-1_amd64.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/t/tcl8.6/libtcl8.6_8.6.10+dfsg-1_amd64.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/t/tcl8.6/tcl8.6_8.6.10+dfsg-1_amd64.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/t/tcl8.6/tcl8.6_8.6.10+dfsg-1_amd64.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/e/expect/tcl-expect_5.45.4-2build1_amd64.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/e/expect/tcl-expect_5.45.4-2build1_amd64.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/e/expect/expect_5.45.4-2build1_amd64.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/e/expect/expect_5.45.4-2build1_amd64.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/libi/libio-pty-perl/libio-pty-perl_1.12-1_amd64.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/libi/libio-pty-perl/libio-pty-perl_1.12-1_amd64.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/libi/libipc-run-perl/libipc-run-perl_20180523.0-2_all.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/libi/libipc-run-perl/libipc-run-perl_20180523.0-2_all.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/libt/libtime-duration-perl/libtime-duration-perl_1.21-1_all.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/libt/libtime-duration-perl/libtime-duration-perl_1.21-1_all.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/libt/libtimedate-perl/libtimedate-perl_2.3200-1_all.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/libt/libtimedate-perl/libtimedate-perl_2.3200-1_all.deb
E: Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/m/moreutils/moreutils_0.63-1_amd64.deb  Downloading mirror file /var/lib/apt/lists/auxfiles/mirrors.ubuntu.com_mirrors.txt failed for mirror://mirrors.ubuntu.com/mirrors.txt/pool/universe/m/moreutils/moreutils_0.63-1_amd64.deb
E: Failed to fetch http://mirrors.ubuntu.com/mirrors.txt  Could not connect to mirrors.ubuntu.com:80 (91.189.89.32), connection timed out
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
+ sudo apt-get -y install moreutils expect-dev

Reading package lists... 0%

Reading package lists... 100%

Reading package lists... Done


Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree       


Reading state information... 0%

Reading state information... 0%

Reading state information... Done

Note, selecting 'expect' instead of 'expect-dev'
The following additional packages will be installed:
  libio-pty-perl libipc-run-perl libtcl8.6 libtime-duration-perl
  libtimedate-perl tcl-expect tcl8.6
Suggested packages:

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.

# RuntimeError: aliasOp != torch::jit::getOperatorAliasMap().end()
# INTERNAL ASSERT FAILED at "../torch/csrc/jit/passes/utils/check_alias_annotation.cpp":159,
# please report a bug to PyTorch.
SkipInfo('TestJit', 'test_variant_consistency_jit',),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I understood so far, it's probably because normalize calls norm and torch.div (or / operator) in its definition:

pytorch/torch/nn/functional.py

Lines 4437 to 4441 in 88af4d8

denom = input.norm(p, dim, keepdim=True).clamp_min(eps).expand_as(input)
return input / denom
else:
denom = input.norm(p, dim, keepdim=True).clamp_min_(eps).expand_as(input)
return torch.div(input, denom, out=out)

Hence the graph created from:

torch._C._jit_pass_inline(CU.the_method.graph)
torch._C._jit_pass_constant_propagation(CU.the_method.graph)
torch._C._jit_check_alias_annotation(CU.the_method.graph, tuple(tensors), aten_name)
doesn't consist of aten::normalize but instead has the nodes for norm and div. This leads to continuing from the loop here (no if condition satisfied):
for (const auto node : g.nodes()) {
if (node->kind() == opName) {
return node;

And hence the final failure here:

AT_ASSERT(aliasOp != torch::jit::getOperatorAliasMap().end());

Was just trying to see what's happening. :) In case it helps!

@mruberry mruberry requested a review from zou3519 August 3, 2021 04:52
@mruberry
Copy link
Collaborator

mruberry commented Aug 3, 2021

@zou3519 would you make sure this covers the cases you need and shepherd this in?

@krshrimali krshrimali added the module: testing Issues related to the torch.testing module (not tests) label Aug 3, 2021
@iramazanli iramazanli added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 3, 2021
@zou3519
Copy link
Contributor

zou3519 commented Aug 3, 2021

Yes, can do!

@facebook-github-bot
Copy link
Contributor

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

@zou3519
Copy link
Contributor

zou3519 commented Aug 6, 2021

@krshrimali could you rebase this please?

@krshrimali
Copy link
Contributor Author

Thanks for the ping, @zou3519 - I've rebased the branch. Also removed supports_out=True since it's already set to True in the OpInfo class. Hope that's okay. Thanks for taking a look.

@mruberry
Copy link
Collaborator

ping @zou3519

@zou3519
Copy link
Contributor

zou3519 commented Aug 12, 2021

Sorry, I missed this notification. @krshrimali could you please rebase this again? (it looks like there are merge conflicts)

@krshrimali
Copy link
Contributor Author

Sorry, I missed this notification. @krshrimali could you please rebase this again? (it looks like there are merge conflicts)

Thanks, @zou3519 for taking a look. I understand, and I should have pinged again but I missed it as well. I have fixed the merge conflicts. :) Thanks again!

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@zou3519 merged this pull request in dcb5eb8.

alanwaketan pushed a commit that referenced this pull request Aug 17, 2021
Summary:
See pytorch/functorch#78 and #54261

cc: mruberry zou3519 Chillee

Pull Request resolved: #62635

Reviewed By: H-Huang

Differential Revision: D30136503

Pulled By: zou3519

fbshipit-source-id: 258c069f30d9c2a51ed27dadf94f3703b9432a4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: testing Issues related to the torch.testing module (not tests) open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants