-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Tensor Expression Debug Display (TEDD) #4651
Conversation
…hedule Tree. 3. Add examples to top level APIs' comments. 4. Top level APIs don't print Dot string by default, unless outputdotstring is True.
@Hzfengsy, could you help reviewing this PR? |
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.
Good job! Very impressive work! Can you write a tutorial which may help people to get started with TEDD.
python/tvm/contrib/tedd.py
Outdated
|
||
|
||
def viz_schedule_tree(sch, | ||
showsvg=False, |
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 you please change the argument name to show_svg
, dot_file_path
and output_dot_string
?
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.
I am making these changes.
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.
@Hzfengsy, I have updated the variable names and avoided some lint warnings from the tests. But the test will still fail because of the ci-cpu doesn't have graphviz. I haven't seen response to my question below. Do you have any suggestion? Thanks
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.
I am also working on a tutorial. How about putting it under tutorial/language?
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.
Sounds great! As for the CI test, I would like to skip this test on the CI until the CI updating.
Also, is there a way to allow contributors to modify the docker image on CI? @tqchen
Many new features depend on different environments. It is difficult to change the CI docker every time by only one person.
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.
I have disabled TEDD execution and verification and kept TE construction in the test.
One question about test failure: https://ci.tvm.ai/blue/organizations/jenkins/tvm/detail/PR-4651/2/pipeline
It fails, because tedd depends on graphviz, but tvmai/ci-cpu:v0.54 doesn't have it. |
Thanks @yongfeng-nv . One thing that I think worth considering, as in many viz tools, is the separation of visualization data schema(in this case the perhaps a dom tree or similar kind) from the visualization itself(graphviz). We can have a tool that extracts the spec into json, then have a tool to take that spec and visualize it |
re CI It would be great to add a testing function to see if graphviz exists, if not skip the test |
@tqchen, I see your point. Let me spec the data source spec. |
@tqchen, @Hzfengsy, I have posted proposal DOM tree in the RFC thread: https://discuss.tvm.ai/t/visualize-tensor-expression/5174/6. Please leave your comments and suggestions. |
d964732
to
26b91a1
Compare
@tqchen, @Hzfengsy Two questions about the tutorial:
|
Thank you for the update. I think the location on You can render the tutorial at local by
|
…(schedule) to dump a json string for the schedule data for visualization. 2. Update tests. 3. Add a tutorial. 4. Add range information to IterVars.
… for DFG. 2. Update tutorial about the InferBound failure.
… tutorial publishing faliure. 2. Fix test about IPython availability check.
The PR is clear from building/testing failures, after qualifying with @Hzfengsy's help on tutorial. |
@tqchen, this PR has been clear for a week. It still needs uploading three static images for the tutorial. Can you help moving it forward? Thank you. |
Sorry about the delay. Thanks @yongfeng-nv @Hzfengsy this PR is now merged! |
* Initial TEDD for publishing. * 1. Fix lint issues. 2. Print intrin.body instead of intrin.name in Schedule Tree. 3. Add examples to top level APIs' comments. 4. Top level APIs don't print Dot string by default, unless outputdotstring is True. * Fix more lint issues. * Update top level API argument names and use raw strings to avoid Python lint warnings in the tests. * Disable TEDD verification, but keep TE construction. * Stop importing tedd to avoid failure. * Separate data extraction and visualization. 1. Add API tedd.dump_json(schedule) to dump a json string for the schedule data for visualization. 2. Update tests. 3. Add a tutorial. 4. Add range information to IterVars. * Update TEDD about InferBound failure. 1. TEDD doesn't call inferbound for DFG. 2. Update tutorial about the InferBound failure. * 1. Import IPython only if SVG is requested. This is required to fix a tutorial publishing faliure. 2. Fix test about IPython availability check.
* Initial TEDD for publishing. * 1. Fix lint issues. 2. Print intrin.body instead of intrin.name in Schedule Tree. 3. Add examples to top level APIs' comments. 4. Top level APIs don't print Dot string by default, unless outputdotstring is True. * Fix more lint issues. * Update top level API argument names and use raw strings to avoid Python lint warnings in the tests. * Disable TEDD verification, but keep TE construction. * Stop importing tedd to avoid failure. * Separate data extraction and visualization. 1. Add API tedd.dump_json(schedule) to dump a json string for the schedule data for visualization. 2. Update tests. 3. Add a tutorial. 4. Add range information to IterVars. * Update TEDD about InferBound failure. 1. TEDD doesn't call inferbound for DFG. 2. Update tutorial about the InferBound failure. * 1. Import IPython only if SVG is requested. This is required to fix a tutorial publishing faliure. 2. Fix test about IPython availability check.
* Initial TEDD for publishing. * 1. Fix lint issues. 2. Print intrin.body instead of intrin.name in Schedule Tree. 3. Add examples to top level APIs' comments. 4. Top level APIs don't print Dot string by default, unless outputdotstring is True. * Fix more lint issues. * Update top level API argument names and use raw strings to avoid Python lint warnings in the tests. * Disable TEDD verification, but keep TE construction. * Stop importing tedd to avoid failure. * Separate data extraction and visualization. 1. Add API tedd.dump_json(schedule) to dump a json string for the schedule data for visualization. 2. Update tests. 3. Add a tutorial. 4. Add range information to IterVars. * Update TEDD about InferBound failure. 1. TEDD doesn't call inferbound for DFG. 2. Update tutorial about the InferBound failure. * 1. Import IPython only if SVG is requested. This is required to fix a tutorial publishing faliure. 2. Fix test about IPython availability check.
This is the PR for a Tensor Expression visualization tool (RFC). Any feedback or comment are welcome.