-
Notifications
You must be signed in to change notification settings - Fork 10
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
Assumptions for work depth analysis #234
Conversation
Co-authored-by: Philipp Schaad <schaad.phil@gmail.com>
Co-authored-by: Philipp Schaad <schaad.phil@gmail.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.
Very nice, thank you :-) Small changes only
src/components/dace_interface.ts
Outdated
this.genericErrorHandler(error.message, error.details); | ||
reject(error.message); | ||
|
||
vscode.window.showInputBox({ |
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 is quite some code repetition, is it possible to factor this out into a separate small function? (Showing the prompt, checking for the format, showing error message if violated, etc.)
backend/run_dace.py
Outdated
@@ -53,7 +53,7 @@ | |||
|
|||
sys.path.append(path.abspath(path.dirname(__file__))) | |||
|
|||
from dace_vscode import arith_ops, depth, transformations | |||
from dace_vscode import depth, transformations |
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.
Can't the dace_vscode.arith_ops
module be removed entirely now?
|
||
from dace_vscode.utils import ( | ||
load_sdfg_from_json, | ||
get_exception_message, | ||
) | ||
|
||
def get_work(sdfg_json, assumptions): |
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 module should now probably be renamed to work_depth
or something :-)
I integrated all your comments:
|
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
This PR enables the user to enter assumptions for the symbols before calling the work depth analysis.
It uses a VS code
InputBox
to handle the input. Validity of the input is checked by a regex. If the check passes, the assumptions are forwarded to the work depth analysis.The corresponding PR to the dace repo can be found here.