Skip to content

Commit c12691a

Browse files
committed
[INIT] Allow proper throw in compiler (apache#39)
1 parent 7f25bf1 commit c12691a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

vta/python/vta/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
"""
77
from __future__ import absolute_import as _abs
88

9-
__version__ = "0.1.0"
9+
import sys
1010

1111
from .bitstream import get_bitstream_path, download_bitstream
1212
from .environment import get_env, Environment
1313
from .rpc_client import reconfig_runtime, program_fpga
1414

15-
try:
15+
__version__ = "0.1.0"
16+
17+
# do not import nnvm/topi when running vta.exec.rpc_server
18+
# to maintain minimum dependency on the board
19+
if sys.argv[0] not in ("-c", "-m"):
1620
from . import top
1721
from .build_module import build_config, lower, build
1822
from . import graph
19-
except (ImportError, RuntimeError):
20-
pass

0 commit comments

Comments
 (0)