Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import #875

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading