Uh oh!
There was an error while loading. Please reload this page.
[TVMSCRIPT] Using diagnostics for TVM Script - #6797
Conversation
tqchen
commented
Oct 30, 2020
Please wait until the jenkinsfile get updated, we will need a separate PR to update the Jenkinsfile first after ensuring the docker staging pass (to prevent other test regressions), will send an update once the image get updated. |
f84943d to
db004abCompare| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| """Bridge from synr DiagnosticContext to TVM's diagnostics""" |
There was a problem hiding this comment.
What is synr ? I don't obviously follow what it means - a quick google search doesn't indicate anything either.
regards
Ramana
There was a problem hiding this comment.
Synr is a small utility library we wrote to normalize the python ast between version changes. You can find it here: https://github.com/octoml/synr.
I'll reword this comment to make it clearer.
There was a problem hiding this comment.
The comment is not very clear as it only refers to linking a Diagnostic context in synr to tvm. Is there an RFC or something that relates to this that you could point people at who might be interested in what problem this is solving and why this is needed ?
There was a problem hiding this comment.
When you parse the AST with synr, you also pass in a object implementing synr's DiagnosticContext interface (https://synr.readthedocs.io/en/latest/#synr.DiagnosticContext). The DiagnosticContext is responsible for accumulating and reporting errors. This file defines a wrapper object that implements synr's DiagnosticContext and calls out to TVMCtx to report errors.
I think the closest RFC you will find is https://discuss.tvm.apache.org/t/rfc-meta-rfc-3-pronged-plan-for-improving-error-messages-in-tvm/7214.
tqchen
commented
Nov 2, 2020
docker images has been updated |
db004ab to
e2b7319Comparejunrushao
commented
Nov 3, 2020
@spectrometerHBH Would you like to take a look? Thanks! |
spectrometerHBH
commented
Nov 3, 2020
Is this PR ready for review? Looks like it encountered problems in CI. |
tkonolige
commented
Nov 3, 2020
@spectrometerHBH Feel free to review it now, I need to bump the dependency in docker. |
| class MetaUnparser(ast.NodeVisitor): | ||
| class MetaUnparser(Transformer): |
There was a problem hiding this comment.
We can consider renaming this class.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
0a4a61b to
c7518aeComparejunrushao
commented
Nov 4, 2020
Do we prefer to maintain synr as an external dependency, and make a release every time, or include synr as part of tvm? |
jroesch
commented
Nov 4, 2020
I think it is valuable to maintain outside of the TVM code base. I know monorepo'ing everything provides some conveniences but when there are reusable components which can be used outside of TVM it makes sense to maintain them as separate pieces of code. For example there have been multiple other projects which have built similar approaches to |
5fa9aa3 to
fd54e42Comparetkonolige
commented
Nov 5, 2020
@leandron Does this PR look good to you now? Or are there any other changes you would like? |
tqchen
commented
Nov 6, 2020
* [TVMSCRIPT] Using diagnostics for TVM Script * fix lint * More documentation, improve some error messages * Apply suggestions from code review Co-authored-by: Leandro Nunes <leandron85@gmail.com> * Add synr to ci setup and setup.py * remove typed_ast dependency Co-authored-by: Leandro Nunes <leandron85@gmail.com>
* [TVMSCRIPT] Using diagnostics for TVM Script * fix lint * More documentation, improve some error messages * Apply suggestions from code review Co-authored-by: Leandro Nunes <leandron85@gmail.com> * Add synr to ci setup and setup.py * remove typed_ast dependency Co-authored-by: Leandro Nunes <leandron85@gmail.com>
* [TVMSCRIPT] Using diagnostics for TVM Script * fix lint * More documentation, improve some error messages * Apply suggestions from code review Co-authored-by: Leandro Nunes <leandron85@gmail.com> * Add synr to ci setup and setup.py * remove typed_ast dependency Co-authored-by: Leandro Nunes <leandron85@gmail.com>
This PR modifies TVM Script to use the new diagnostics interface. This should make error messages a lot clearer.
This PR depends on #6795.
@jroesch@tqchen@junrushao1994