-
Notifications
You must be signed in to change notification settings - Fork 157
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
[one-optimize] Refactor RemoveDeadNodeWithQueryPass #13863
Comments
do you have a model for this? |
BackgroundI found this issue when I'm trying to support non-const paddings for pad ops in #13790 . How to reproduceSince I found this issue with code in my own repo, I made some sample model to reproduce this issue. |
When run with debugger, following is result. After passing through SubstitutePackToReshapePass, five DeadNode candidates are generated. Among them, the nodes with indices 0, 3, and 4 are optimized dead nodes, while the nodes with indices 1 and 2 are actually not dead. However, it is observed that the node with index 2 (0x5555555bbb10) still remains in the list of candidates even after passing through the for-loop. |
@icodo98 for (auto it = candidates.begin(); it != candidates.end(); )
{
if (auto service = (*it)->dialect()->service<DeadNodeQueryService>())
{
if (!service->isDeadNode(*it))
{
it = candidates.erase(it);
continue;
}
}
++it;
} |
Nice catch! Thanks for reporting. I'll make a fix soon :) |
If it's alright with you, I was working on a draft based on the code I wrote. Would you like me to continue writing it? |
Of course I'm okay with it :) One concern is that this seems to be out of the scope of ssafy project. @shs-park Is it ok @Hanjin-Choi contribute this topic? One thing to note: Patch itself would be simple, but I guess that writing a test code would be more laborious. |
I agree. But it would be an honor to have the opportunity to take on the challenge. |
I assigned @Hanjin-Choi to this issue. |
The |
I feel sorry for dragging this Issue. I thought I need to make graph to check whether node is dead or not.
|
It seems that you try to implement gtest. If you take that approach, you should implement a test under Rather than implementing gtest, it would be easier to implement a regression test for the problematic model. You can add a test in
It would be great if you can post the result of 4 and 5 in the draft PR, |
Thanks a lot! I will follow your suggestion. |
I wrote Draft-PR |
I think all the related PRs are merged, so I will close this issue. |
I think code here is bug.
ONE/compiler/logo/src/Passes/RemoveDeadNodeWithQueryPass.cpp
Lines 45 to 55 in aa2ff1b
The current code has an issue where, if both normal and dead nodes are mixed in the
candidates
, it deletes the normal nodes but skips over checking the other candidate nodes.The text was updated successfully, but these errors were encountered: