Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadh committed Feb 24, 2023
1 parent 5527370 commit 0c099de
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion apps/microtvm/cmsisnn/run_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ python3 -m tvm.driver.tvmc compile --target=cmsis-nn,c \
--executor=aot \
--executor-aot-interface-api=c \
--executor-aot-unpacked-api=1 \
--pass-config tir.usmp.enable=1 \
--pass-config tir.usmp.algorithm=hill_climb \
--pass-config tir.disable_storage_rewrite=1 \
--pass-config tir.disable_vectorize=1 ./person_detect.tflite \
Expand Down
1 change: 0 additions & 1 deletion apps/microtvm/ethosu/run_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ python3 -m tvm.driver.tvmc compile --target=ethos-u,cmsis-nn,c \
--executor=aot \
--executor-aot-interface-api=c \
--executor-aot-unpacked-api=1 \
--pass-config tir.usmp.enable=1 \
--pass-config tir.usmp.algorithm=hill_climb \
--pass-config tir.disable_storage_rewrite=1 \
--pass-config tir.disable_vectorize=1 ./mobilenet_v2_1.0_224_INT8.tflite --output-format=mlf
Expand Down
1 change: 1 addition & 0 deletions tests/python/contrib/test_cmsisnn/test_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def test_conv2d_number_primfunc_args(
AOTTestModel(module=cmsisnn_mod, inputs=inputs, outputs=output_list, params=params),
interface_api,
use_unpacked_api,
pass_config={"tir.usmp.enable": False},
)

# validate number of TIR primfunc args
Expand Down
3 changes: 3 additions & 0 deletions tests/python/relay/aot/test_crt_aot.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ def @main(%data: Tensor[(1, 4, 4, 4), float32], %weight: Tensor[(4, 4, 3, 3), fl
models=AOTTestModel(module=relay_mod, inputs=None, outputs=None),
interface_api="c",
use_unpacked_api=True,
pass_config={"tir.usmp.enable": False},
)
source = compiled_test_mods[0].executor_factory.lib.imported_modules[0].get_source()
# There should be three allocates created for three primitive relay function
Expand All @@ -827,6 +828,7 @@ def test_constants_alignment(constants_byte_alignment):
interface_api,
use_unpacked_api,
target=tvm.target.Target(target, host=target),
pass_config={"tir.usmp.enable": False},
)
source = compiled_test_mods[0].executor_factory.lib.imported_modules[0].get_source()
assert f'__attribute__((section(".rodata.tvm"), aligned({constants_byte_alignment})))' in source
Expand Down Expand Up @@ -966,6 +968,7 @@ def test_workspace_calculation(workspace_byte_alignment, main_workspace_size):
opt_level=3,
config={
"tir.disable_vectorize": True,
"tir.usmp.enable": False,
},
):
lib = tvm.relay.build(mod, target, executor=executor, runtime=runtime, params=params)
Expand Down
8 changes: 6 additions & 2 deletions tests/python/unittest/test_micro_model_library_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ def test_export_model_library_format_c(
):
target = tvm.target.target.micro("host")
with utils.TempDirectory.set_keep_for_debug(True):
with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}):
with tvm.transform.PassContext(
opt_level=3, config={"tir.disable_vectorize": True, "tir.usmp.enable": False}
):
relay_mod = tvm.relay.fromtext(
"""
#[version = "0.0.5"]
Expand Down Expand Up @@ -338,7 +340,9 @@ def @main(%a : Tensor[(1, 2), uint8], %b : Tensor[(1, 2), float32], %c : Tensor[
)
def test_export_model_library_format_workspace(executor, runtime):
target = tvm.target.target.micro("host")
with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}):
with tvm.transform.PassContext(
opt_level=3, config={"tir.disable_vectorize": True, "tir.usmp.enable": False}
):
relay_mod = tvm.relay.fromtext(
"""
#[version = "0.0.5"]
Expand Down

0 comments on commit 0c099de

Please sign in to comment.