-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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] [ir] IR system refactorings #1058
Conversation
This PR literally follows guidelines from #988, with minimal modifications to backend code(namely adding However, it has not yet implemented the last point on removing
Regarding this, there are plenty of The remaining |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -113,13 +113,14 @@ class ConstantFold : public BasicStmtVisitor { | |||
rhs.dt, | |||
true}; | |||
auto *ker = get_jit_evaluator_kernel(id); | |||
auto &ctx = get_current_program().get_context(); | |||
auto ¤t_program = stmt->get_kernel()->program; | |||
auto &ctx = current_program.get_context(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This segment has some issues with it. Please see comment below
The current build has failed due to segfault in C++ tests (all broken tests are due to the same reason, you can simply take The source of segfault lies in the above segment in However, I find this is rare for taichi program written in python, because in such cases, To pass the C++ tests, one way is to fallback the above code segment to using updates: updates 2: |
For C++ tests, Maybe we also need a |
Yes, I find that program is constructed with kernel set properly. But the kernel itself is not connected to IRNode. |
I am thinking modifying tests hugely are adding too much in this PR. Maybe we can do a hack by adding |
Let's use |
Then it would involve changing plenty of places in C++ test code, but I assume most of them would be insignificant, especially no one would affect the check semantics itself. If that's OK for you, then I'll have a try right away |
I see. Feel free to pick the most convenient solution then.
This sounds like the easiest way given the current situation. |
Yeah, since C++ tests are manually constructing |
Summary:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hard work! Just a nit.
Co-authored-by: xumingkuan <xumingkuan0721@126.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks! @xumingkuan Please merge when everything's good on your part :-)
Thanks for the review! |
Related issue = #988
[Click here for the format server]