Skip to content

Conversation

@RajeevSekar
Copy link

Models with nodes like QLinear, DQLinear and similar ones were crashing while running perf test, due to an issue in the sub graph partitioning logic

omit_subgraph = false;
} else if (j < total_clusters - 1) {
bool append_node = false;
while (j < total_clusters && !append_node) {

Choose a reason for hiding this comment

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

can we add the increment part of loop so that the additional check can be removed.

something like
while (++j < total_clusters && !append_node)

Copy link
Author

Choose a reason for hiding this comment

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

Hi Preetha, I have made that change, thanks for pointing it out

Copy link
Author

Choose a reason for hiding this comment

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

Hi Preetha, due to this change of adding the increment part in the loop, an issue was created.

Old logic (larger loop)
In the case where j < total_clusters is true but append node is also true (the loop is not entered), j is not incremented

New logic (shorter loop)
In the case ++j is still < total_clusters but append node is true, the loop is not entered but j is aldready incremented (unlike the first logic).

so, just after the loop, in this block

if (append_node) {
connected_clusters[j].emplace_back(index);
}

incorrect value of j is used which causes some model to fail.

So we cant use "while (++j < total_clusters && !append_node)"

Is there a way to optimize the loop logic but retain the j if we exit the loop due to append_node == true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants