-
Notifications
You must be signed in to change notification settings - Fork 129
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
Work Depth Analysis for SDFGs #1327
Conversation
dace/sdfg/propagation.py
Outdated
if state in full_merge_states: | ||
state.dynamic_executions = False | ||
# TODO: do we need this else here or not? | ||
# else: |
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.
Yes there are some situations where this may be needed. Consider an if-else state machine which merges back into some common state mergestate
, but where one of the branches may terminate the program based on some additional condition. In this case mergestate
is not a full merge state, since there are program paths that may not reach it. In that case, the number of executions is dynamic, i.e. in [0:state.executions]
.
|
||
def count_depth_reduce(node, symbols, state): | ||
# depth of reduction is log2 of the work | ||
# TODO: Can we actually assume this? Or is it equal to the work? |
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.
As discussed :-)
|
||
|
||
def tasklet_depth(tasklet_node, state): | ||
# TODO: how to get depth of CPP tasklets? |
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.
Will be tricky, but for now I think it's fair to reduce analysis capabilites for those tasklets. We do this in general currently.
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.
Now that tests pass and everything has been addressed, LGTM - thanks!
This PR adds work depth analysis of SDFGs. It includes three files:
work_depth.py
: The analysis itself.helpers.py
: Helper functions used by the analysis.work_depth_tests.py
: Some small test SDFGs for the analysis.This PR is one of three PRs. They include: