From 25c70395b9799837dd6222b95da03c902c34691f Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Thu, 24 May 2018 10:36:46 -0700 Subject: [PATCH] [INIT] Allow proper throw in compiler (#39) --- python/vta/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/vta/__init__.py b/python/vta/__init__.py index c2dc7c30d190..926d73649b31 100644 --- a/python/vta/__init__.py +++ b/python/vta/__init__.py @@ -6,15 +6,17 @@ """ from __future__ import absolute_import as _abs -__version__ = "0.1.0" +import sys from .bitstream import get_bitstream_path, download_bitstream from .environment import get_env, Environment from .rpc_client import reconfig_runtime, program_fpga -try: +__version__ = "0.1.0" + +# do not import nnvm/topi when running vta.exec.rpc_server +# to maintain minimum dependency on the board +if sys.argv[0] not in ("-c", "-m"): from . import top from .build_module import build_config, lower, build from . import graph -except (ImportError, RuntimeError): - pass