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

[ir] [autodiff] Initialize ADStack with a zero #1791

Merged
merged 3 commits into from
Aug 28, 2020

Conversation

yuanming-hu
Copy link
Member

@codecov
Copy link

codecov bot commented Aug 27, 2020

Codecov Report

Merging #1791 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0c5a57...84da1cb. Read the comment docs.

Copy link
Collaborator

@archibate archibate left a comment

Choose a reason for hiding this comment

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

LGTMig!

Comment on lines 210 to 211
// Note that unlike AllocStmt, StackAllocaStmt does NOT have an 0 as
// initial value. Therefore here we push an initial 0 value.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// 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?

Copy link
Contributor

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.

@archibate
Copy link
Collaborator

Merging this for #1752.

@archibate archibate merged commit dec1591 into taichi-dev:master Aug 28, 2020
@yuanming-hu yuanming-hu mentioned this pull request Sep 1, 2020
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.

[bug] [autodiff] Empty AdStack loaded
3 participants