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

[refactor] Separate SNode read/write kernels into a dedicated class #2205

Merged
merged 3 commits into from
Mar 10, 2021

Conversation

k-ye
Copy link
Member

@k-ye k-ye commented Mar 8, 2021

Related issue = #2196

Purpose

This is one of the steps to decouple SNode from taichi/program. Because many files inside taichi/ir depend on SNode, they transitively depend on taichi/program as well. taichi/program is very high level, and almost depends on everything in the codebase. So without breaking the tie, it is very hard for us to separate out IR.

Note that this PR alone is not enough (actually, far from enough) for modularizing the IR. I'm thinking of moving out SNode::expr later (we may have to have a similar mapping from SNode to expr). The reason is similar:

  1. expr is an Expr, which depends on the expression and the frontend IR
  2. Frontend IR depends on taichi/program.

As a short-term goal, I think it will be good enough if we can make ir.h/cpp, statements.h/cpp, snode.h/cpp self contained.

[Click here for the format server]


@k-ye k-ye requested a review from taichi-gardener March 8, 2021 13:31
Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Cool! LGTM!

Copy link
Contributor

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

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

LGTM!

@k-ye k-ye merged commit f41e889 into taichi-dev:master Mar 10, 2021
@k-ye k-ye deleted the refactor-snode branch March 10, 2021 00:37
@k-ye k-ye mentioned this pull request Mar 14, 2021
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.

4 participants