You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/04 18:08:00 UTC

[GitHub] [incubator-tvm] tkonolige commented on a change in pull request #6797: [TVMSCRIPT] Using diagnostics for TVM Script

tkonolige commented on a change in pull request #6797:
URL: https://github.com/apache/incubator-tvm/pull/6797#discussion_r517535382



##########
File path: python/tvm/script/parser.py
##########
@@ -14,21 +14,22 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-"""TVM Script Parser For TIR"""
-# pylint: disable=invalid-name, missing-docstring, inconsistent-return-statements, no-else-return
-# pylint: disable=unnecessary-comprehension, unused-argument
-# pylint: disable=relative-beyond-top-level
+"""TVM Script Parser For TIR
+
+We use [synr](https://synr.readthedocs.io) to get an AST that is stable over
+different python versions. Synr also provides an error handling context that we
+use for error reporting.
+"""
+# pylint: disable=invalid-name, inconsistent-return-statements, no-else-return
 import json
 import operator
 import inspect
-from typed_ast import ast3 as ast
+from synr import ast, Transformer, to_ast

Review comment:
       Synr is listed in `incubator-tvm/docker/install/ubuntu_install_python_package.sh` (this branch wasn't up to date with main). We think we might have to update it often in the future, so we are installing a pinned version in the ci before we run tests (in `tests/scripts/task_ci_python_setup.sh`).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org