Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Apr 11, 2024
1 parent 607c5c6 commit 5f198eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions mlonmcu/models/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ def generate_input_data(self, input_names, input_types, input_shapes, input_quan
if UPPER is None:
UPPER = dtype_info.max
else:
assert UPPER <= dtype_info.max, f"Out of dtype bound"
assert UPPER <= dtype_info.max, "Out of dtype bound"
if LOWER is None:
LOWER = dtype_info.min
else:
assert LOWER >= dtype_info.min, f"Out of dtype bound"
assert LOWER >= dtype_info.min, "Out of dtype bound"
else:
raise RuntimeError(f"Unsupported dtype: {gen_dtype}")
RANGE = UPPER - LOWER
Expand All @@ -244,7 +244,8 @@ def generate_input_data(self, input_names, input_types, input_shapes, input_quan
# if "float" in dtype:
# arr = np.random.rand(*shape).astype(dtype)
# elif "int" in dtype:
# arr = np.random.randint(np.iinfo(dtype).min, np.iinfo(dtype).max, size=shape, dtype=dtype)
# arr = np.random.randint(np.iinfo(dtype).min,
# np.iinfo(dtype).max, size=shape, dtype=dtype)
# else:
# assert False
# Quantize if required
Expand Down
2 changes: 0 additions & 2 deletions mlonmcu/platform/tvm/tvm_target_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
#
"""TVM Target Platform"""
import os
from pathlib import Path
from mlonmcu.config import str2bool
from .tvm_rpc_platform import TvmRpcPlatform
from ..platform import TargetPlatform
from mlonmcu.target import get_targets
from mlonmcu.target.target import Target
from .tvm_target import create_tvm_platform_target
from mlonmcu.artifact import Artifact, ArtifactFormat
from mlonmcu.flow.tvm.backend.tvmc_utils import (
get_bench_tvmc_args,
get_data_tvmc_args,
Expand Down

0 comments on commit 5f198eb

Please sign in to comment.