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

[autoparallel] fix C version rotor inconsistency #1691

Merged
merged 41 commits into from Oct 12, 2022

Conversation

Cypher30
Copy link
Contributor

What's New?

Previously in PR #1679 , @super-dainiu reported the inconsistency between C version and python version of rotor solver, I dived into the C source code and found that the problem is that the C version compute the value in different order, with older version of profiler, the computation order will not damage the result, but currently some of the output of profiler has memory size of 0 (depends on newer version of graph analysis, some of the operation will discard the input), thus, the different order will cause solver failure. In this PR, I fix this problem and now the C version is consistent with python version.

Cypher30 and others added 30 commits July 14, 2022 16:07
setattr(gm, "__sequence__", sequence)

# set __opttable__ attribute to GraphModule
setattr(gm, "__opttable__", opt_table[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

why opttable[0]?

Copy link
Contributor Author

@Cypher30 Cypher30 Oct 12, 2022

Choose a reason for hiding this comment

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

because I think don't need what table to be attached to the graph module, the returned opt_table by solver is a table containing opt_table[0] = opt, opt_table[1] = what, and I think we only need opt to check the value.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see

@Cypher30 Cypher30 merged commit 31d2f03 into hpcaitech:main Oct 12, 2022
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.

None yet

2 participants