[go: nahoru, domu]

Skip to content
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

A name conflict bug caused by LoweringFunctionalOps pass #50393

Open
Niz13 opened this issue Jun 22, 2021 · 4 comments
Open

A name conflict bug caused by LoweringFunctionalOps pass #50393

Niz13 opened this issue Jun 22, 2021 · 4 comments
Assignees
Labels
comp:core issues related to core part of tensorflow stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.5 Issues related to TF 2.5 type:bug Bug

Comments

@Niz13
Copy link
Niz13 commented Jun 22, 2021

System information

  • TensorFlow version: 2.5.0
  • Python version: 3.6

Describe the current behavior

When running testSkipEagerCaseLoweringPreservesNameForFetch test from tensorflow/tensorflow/blob/master/tensorflow/python/kernel_tests/functional_ops_test.py on a device that isn’t CPU/GPU the test fails due to a naming conflict in TF:
“Invalid argument: Node 'Case/branch_index/_3' is not unique”

During LoweringFunctionalOps pass, the Case node is replaced with a graph that contains a _SwitchN nodes with the name 'Case/branch_index/_3' with an input that is named 'Case/branch_index/’.
Later, during graph partitioning, a _Send node is added between the Const input and the _SwitchN node which happens to get the name 'Case/branch_index/_3' thus causing a conflict.

Here is a schematic of the situation:
case2

  • Do you want to contribute a PR? (yes/no): no

Other info / logs
The _SwitchN name given during the lowering phase happens at:
tensorflow/core/common_runtime/lower_case_op.cc:122
The _Send name given during partitioning happens at:
tensorflow/core/graph/graph_partition.cc:241

@Niz13 Niz13 added the type:bug Bug label Jun 22, 2021
@tilakrayal tilakrayal added TF 2.5 Issues related to TF 2.5 comp:ops OPs related issues labels Jun 23, 2021
@ymodak ymodak added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jun 23, 2021
@jsmeredith
Copy link
Contributor

Hi! Can you clarify the reproduction conditions a little more? Specifically, you said that it fails that test in functional_ops_test.py "on a device that isn’t CPU/GPU" -- is there a specific setup that we can try? Thanks!

@ymodak ymodak added the stat:awaiting response Status - Awaiting response from author label Jun 28, 2021
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler google-ml-butler bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Jul 5, 2021
@Niz13
Copy link
Author
Niz13 commented Jul 6, 2021

Hello,
Unfortunately, it isn't possible to provide you with a specific setup that would reproduce this, however, I can provide you with the pre-partitioning and post-partitioning graphs where it is possible to see the problem unfolding.
(These are .pbtxt files, for some reason couldn't upload .pbtxt files here)

before.txt
after.txt

In the after.txt graph, if you look for 'Case/branch_index/_3' you would see two nodes with that name.: a _SwitchN and a _Recv.

One thing you can try is maybe placing the _SwitchN on CPU, the reason this doesn't reproduce on GPU is due to the fact that both the _SwitchN and the Const before it are placed on GPU so a _Recv isn't added.

Hope this gives you a lead, let me know if you need any extra information!

@google-ml-butler google-ml-butler bot removed stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author labels Jul 6, 2021
@puneeshkhanna
Copy link
Contributor

Same issue is also seen in another test "testCaseLowering" in the same file if you execute the test on another device other than CPU or GPU.

@tilakrayal tilakrayal added comp:core issues related to core part of tensorflow and removed comp:ops OPs related issues labels Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:core issues related to core part of tensorflow stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.5 Issues related to TF 2.5 type:bug Bug
Projects
None yet
Development

No branches or pull requests

6 participants