Skip to content

Commit

Permalink
Fix import (#875)
Browse files Browse the repository at this point in the history
Small hotfix for import meta_schedule in `get-tvm-model`
  • Loading branch information
arjunsuresh authored Jul 24, 2023
2 parents 9a040c3 + 180ae94 commit 4c1a536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cm-mlops/script/get-tvm-model/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from tvm import relay
from tvm.driver.tvmc.model import TVMCModel
from tvm.driver.tvmc.frontends import load_model
from tvm import meta_schedule as ms
from typing import Dict, Tuple, Optional, List, Any, Union

def get_shape_dict_from_onnx(
Expand Down Expand Up @@ -65,7 +66,6 @@ def tune_model(
params: Dict[str, tvm.nd.NDArray],
target: tvm.target.Target,
) -> Tuple[str, tvm.meta_schedule.database.Database]:
from tvm import meta_schedule as ms
work_dir = os.path.join(os.getcwd(), "metaschedule_workdir")
if not os.path.exists(work_dir):
os.mkdir(work_dir)
Expand Down Expand Up @@ -107,7 +107,7 @@ def compile_model(
opt_level: int,
build_conf: Dict[str, Any],
use_vm: bool,
database: Optional[tvm.meta_schedule.database.Database] = None,
database: Optional[ms.database.Database] = None,
) -> Union[tvm.runtime.Module, tvm.runtime.vm.Executable]:
if work_dir != '':
if not database:
Expand Down

0 comments on commit 4c1a536

Please sign in to comment.