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

[lang] Refactor cg solvers #7911

Merged

Conversation

houkensjtu
Copy link
Contributor

@houkensjtu houkensjtu commented Apr 27, 2023

Issue: #7837

Brief Summary

As described in Issue #7837 , I first implemented Plan # 1 to enforce a more consistent naming for the current solvers. All solver code are untouched, except for the naming:

ti.linalg.SparseSolver => no change 
ti.linalg.CG => ti.linalg.SparseCG
ti.linalg.taichi_cg_solver => ti.linalg.MatrixFreeCG

The Python test scripts are also updated accordingly. This doesn't mean Plan # 3 is abandoned though: we can unify SparseCG and MatrixFreeCG in the future if that's the route we want.

@netlify
Copy link

netlify bot commented Apr 27, 2023

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 130c5d1
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/64539a8cd17b260008c268a3
😎 Deploy Preview https://deploy-preview-7911--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Collaborator

@FantasyVR FantasyVR left a comment

Choose a reason for hiding this comment

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

Thanks! It's better to add docstrings for both two CG solvers.

python/taichi/linalg/sparse_cg.py Show resolved Hide resolved
Copy link
Collaborator

@FantasyVR FantasyVR left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@neozhaoliang neozhaoliang left a comment

Choose a reason for hiding this comment

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

LGTM!

@neozhaoliang neozhaoliang merged commit 2153b2b into taichi-dev:master May 8, 2023
neozhaoliang added a commit that referenced this pull request May 8, 2023
Issue: #7837 

### Brief Summary

As a follow-up PR related to issue #7837 and PR #7911, split the
description for linear solver from `sparse_matrix.md`. More information
will be filled into the additional `linear_solver.md` page once PR #7911
is merged, to reflect the latest usage information of the linear
solvers.

---------

Co-authored-by: Zhao Liang <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
Issue: taichi-dev#7837 

### Brief Summary

As described in Issue taichi-dev#7837 , I first implemented Plan # 1 to enforce a
more consistent naming for the current solvers. All solver code are
untouched, except for the naming:
```
ti.linalg.SparseSolver => no change 
ti.linalg.CG => ti.linalg.SparseCG
ti.linalg.taichi_cg_solver => ti.linalg.MatrixFreeCG
```
The Python test scripts are also updated accordingly. This doesn't mean
Plan # 3 is abandoned though: we can unify `SparseCG` and `MatrixFreeCG`
in the future if that's the route we want.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…7921)

Issue: taichi-dev#7837 

### Brief Summary

As a follow-up PR related to issue taichi-dev#7837 and PR taichi-dev#7911, split the
description for linear solver from `sparse_matrix.md`. More information
will be filled into the additional `linear_solver.md` page once PR taichi-dev#7911
is merged, to reflect the latest usage information of the linear
solvers.

---------

Co-authored-by: Zhao Liang <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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