Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
7e9ec735
Unverified
Commit
7e9ec735
authored
Feb 16, 2020
by
masahi
Committed by
GitHub
Feb 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve antlr import error message (#4888)
parent
feda150e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
python/tvm/relay/_parser.py
+8
-7
No files found.
python/tvm/relay/_parser.py
View file @
7e9ec735
...
@@ -48,13 +48,6 @@ from . import op
...
@@ -48,13 +48,6 @@ from . import op
PYTHON_VERSION
=
sys
.
version_info
.
major
PYTHON_VERSION
=
sys
.
version_info
.
major
try
:
try
:
from
.grammar.py3.RelayVisitor
import
RelayVisitor
from
.grammar.py3.RelayParser
import
RelayParser
from
.grammar.py3.RelayLexer
import
RelayLexer
except
ImportError
:
raise
Exception
(
"Couldn't find ANTLR parser. Try building with USE_ANTLR=ON."
)
try
:
from
antlr4
import
InputStream
,
CommonTokenStream
from
antlr4
import
InputStream
,
CommonTokenStream
from
antlr4.error.ErrorListener
import
ErrorListener
from
antlr4.error.ErrorListener
import
ErrorListener
except
ImportError
:
except
ImportError
:
...
@@ -62,6 +55,14 @@ except ImportError:
...
@@ -62,6 +55,14 @@ except ImportError:
"Try running `pip{version} install antlr4-python{version}-runtime`."
"Try running `pip{version} install antlr4-python{version}-runtime`."
.
format
(
version
=
PYTHON_VERSION
))
.
format
(
version
=
PYTHON_VERSION
))
try
:
from
.grammar.py3.RelayVisitor
import
RelayVisitor
from
.grammar.py3.RelayParser
import
RelayParser
from
.grammar.py3.RelayLexer
import
RelayLexer
except
ImportError
:
raise
Exception
(
"Couldn't find ANTLR parser. Try building with USE_ANTLR=ON."
)
sys
.
setrecursionlimit
(
10000
)
sys
.
setrecursionlimit
(
10000
)
class
ParseError
(
Exception
):
class
ParseError
(
Exception
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment