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

[async] [opt] Field value killing analysis #1929

Merged
merged 6 commits into from
Oct 9, 2020

Conversation

xumingkuan
Copy link
Collaborator

@xumingkuan xumingkuan commented Oct 8, 2020

Related issue = #742

Changes:

  • Analyze (with control flow graph) exactly which SNodes' original values before the OffloadedStmt are read inside the OffloadedStmt, and which GlobalPtrStmts' original value is still reachable at the end of the OffloadedStmt. These two cases, together with SNodes that are not element-wise written, should be the set of input value states in the TaskMeta.
  • If the above analysis is accurate, RAW should be the only flow edge -- WAW becomes a dependency edge.
  • Fix a bug that broke state-flow chains.

[Click here for the format server]


@xumingkuan xumingkuan marked this pull request as ready for review October 8, 2020 10:10
@xumingkuan
Copy link
Collaborator Author

Not sure if the SFG is correct after this PR... I'll take a deeper look tmr.

Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

LGTM!

taichi/ir/control_flow_graph.cpp Show resolved Hide resolved
taichi/program/state_flow_graph.cpp Outdated Show resolved Hide resolved
@xumingkuan

This comment has been minimized.

@xumingkuan

This comment has been minimized.

@xumingkuan xumingkuan changed the title [async] Field value killing analysis [async] [opt] Field value killing analysis Oct 9, 2020
@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #1929 into master will increase coverage by 0.92%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1929      +/-   ##
==========================================
+ Coverage   42.80%   43.72%   +0.92%     
==========================================
  Files          45       45              
  Lines        6413     6207     -206     
  Branches     1101     1103       +2     
==========================================
- Hits         2745     2714      -31     
+ Misses       3498     3322     -176     
- Partials      170      171       +1     
Impacted Files Coverage Δ
...aichi-dev/taichi/python/taichi/lang/ast_checker.py 70.58% <0.00%> (-1.64%) ⬇️
...s/build/taichi-dev/taichi/python/taichi/testing.py 75.00% <0.00%> (-0.72%) ⬇️
...ild/taichi-dev/taichi/python/taichi/lang/linalg.py 89.33% <0.00%> (-0.67%) ⬇️
...build/taichi-dev/taichi/python/taichi/lang/meta.py 64.38% <0.00%> (-0.49%) ⬇️
...d/taichi-dev/taichi/python/taichi/lang/__init__.py 40.45% <0.00%> (-0.33%) ⬇️
...build/taichi-dev/taichi/python/taichi/misc/util.py 18.27% <0.00%> (-0.24%) ⬇️
...build/taichi-dev/taichi/python/taichi/misc/task.py 0.00% <0.00%> (ø)
.../taichi-dev/taichi/python/taichi/tools/patterns.py 0.00% <0.00%> (ø)
.../build/taichi-dev/taichi/python/taichi/misc/gui.py 8.68% <0.00%> (+0.07%) ⬆️
...ild/taichi-dev/taichi/python/taichi/lang/kernel.py 71.39% <0.00%> (+0.13%) ⬆️
... and 9 more

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 ddf7513...1ca7db5. Read the comment docs.

@xumingkuan xumingkuan merged commit 4fa0d60 into taichi-dev:master Oct 9, 2020
@yuanming-hu yuanming-hu mentioned this pull request Oct 10, 2020
@xumingkuan xumingkuan deleted the killing branch October 12, 2020 08:50
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.

None yet

3 participants