Skip to content

[fx] Modify solver linearize and add corresponding test#1531

Merged
super-dainiu merged 29 commits intohpcaitech:mainfrom
Cypher30:hotfix/fix_solver_linearize
Sep 2, 2022
Merged

[fx] Modify solver linearize and add corresponding test#1531
super-dainiu merged 29 commits intohpcaitech:mainfrom
Cypher30:hotfix/fix_solver_linearize

Conversation

@Cypher30
Copy link
Copy Markdown
Contributor

@Cypher30 Cypher30 commented Sep 1, 2022

What's New

In PR #1496, @super-dainiu suggests that we could use more elegant linearize code and node structure, but at that time we still worried about the time overhead for solver to solve the sequence. After some experiments, I'm sure that this old linearize could be left and use the suggested structure. I also add a test to check if the solver's sequence and annotated result is correct. Lastly, I fix a couple of lines of old inefficient code in activation_checkpoint_codgen.py and ckpt_solver_rotor.py.

@Cypher30
Copy link
Copy Markdown
Contributor Author

Cypher30 commented Sep 1, 2022

Screen Shot 2022-09-01 at 16 35 46

Currently we use MetaTensor implemented by @super-dainiu, which could not be used in torch11, the above is the result of `test_fx`.

Comment thread tests/test_fx/test_ckpt_solvers/test_linearize.py Outdated
Comment thread tests/test_fx/test_ckpt_solvers/test_linearize.py Outdated
@super-dainiu super-dainiu self-requested a review September 2, 2022 02:24
@super-dainiu super-dainiu merged commit 5615904 into hpcaitech:main Sep 2, 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.

3 participants