-
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
[ir] [autodiff] Initialize ADStack with a zero #1791
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1791 +/- ##
=======================================
Coverage 61.74% 61.74%
=======================================
Files 19 19
Lines 3850 3850
Branches 691 691
=======================================
Hits 2377 2377
Misses 1348 1348
Partials 125 125 Continue to review full report at Codecov.
|
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.
LGTMig!
taichi/transforms/auto_diff.cpp
Outdated
// Note that unlike AllocStmt, StackAllocaStmt does NOT have an 0 as | ||
// initial value. Therefore here we push an initial 0 value. |
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.
// Note that unlike AllocStmt, StackAllocaStmt does NOT have an 0 as | |
// initial value. Therefore here we push an initial 0 value. | |
// Note that unlike AllocaStmt, StackAllocaStmt does NOT have an 0 as | |
// initial value. Therefore here we push an initial 0 value. |
How about enforce StackAllocaStmt
to be zero initialized over backends like CC did in #1752?
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.
There's nothing needed to be done in the backends. The instruction pushing a zero is emitted into the IR and StackAllocaStmt
only needs to create an empty stack.
Merging this for #1752. |
Related issue = close #1781
[Click here for the format server]