From 2370a1ac5390833bb9775379e494bd5c59da6e05 Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Mon, 7 Oct 2019 19:19:36 -0700 Subject: [PATCH] Fix lint --- python/tvm/relay/backend/profiler_vm.py | 1 - python/tvm/relay/backend/vm.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python/tvm/relay/backend/profiler_vm.py b/python/tvm/relay/backend/profiler_vm.py index 5aa6d90183766..77bb87d80413c 100644 --- a/python/tvm/relay/backend/profiler_vm.py +++ b/python/tvm/relay/backend/profiler_vm.py @@ -21,7 +21,6 @@ Provides extra APIs for profiling vm execution. """ import tvm -from tvm import autotvm from . import vm, _vm def _update_target(target): diff --git a/python/tvm/relay/backend/vm.py b/python/tvm/relay/backend/vm.py index f4182f15306cb..99b964f91a43c 100644 --- a/python/tvm/relay/backend/vm.py +++ b/python/tvm/relay/backend/vm.py @@ -134,6 +134,7 @@ def __init__(self): self._set_params_func = self.mod["set_params"] def set_params(self, params): + """Set constant parameters for the model""" inputs = {} for name, param in params.items(): if isinstance(param, np.ndarray): @@ -142,6 +143,7 @@ def set_params(self, params): self._set_params_func(inputs) def update_target(self, target): + """Update target""" target = target if target else tvm.target.current_target() if target is None: raise ValueError("Target is not set in env or passed as argument.") @@ -160,6 +162,7 @@ def update_target(self, target): return tgts def update_target_host(self, target, target_host): + """Update target host""" target_host = None if target_host == "" else target_host if not target_host: for device_type, tgt in target.items():