Skip to content

Commit

Permalink
[Unittest] Fixing unittest (#9180)
Browse files Browse the repository at this point in the history
  • Loading branch information
spectrometerHBH committed Oct 2, 2021
1 parent 89e7b6f commit 47095d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/tvm/script/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def B(...):
__tvm_meta__ = ...
# returns an IRModule
mod = MyMod()
mod = MyMod
"""
if len(node.funcs) == 1:
return self.transform(next(iter(node.funcs.values())))
Expand Down
14 changes: 7 additions & 7 deletions tests/python/unittest/test_meta_schedule_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_meta_schedule_rpc_single_run():
def test_meta_schedule_local_single_run():
"""Test meta schedule local runner for a single run"""
# Build the module
mod = MatmulModule()
mod = MatmulModule
builder = LocalBuilder()
(builder_result,) = builder.build([BuilderInput(mod, Target("llvm"))])
assert builder_result.artifact_path is not None
Expand Down Expand Up @@ -285,9 +285,9 @@ def test_meta_schedule_local_multiple_runs():
"""Test meta schedule local runner for multiple runs"""
# Build the module
mods = [
MatmulModule(),
MatmulReluModule(),
BatchMatmulModule(),
MatmulModule,
MatmulReluModule,
BatchMatmulModule,
]
builder = LocalBuilder()
builder_inputs = [BuilderInput(mod, Target("llvm")) for mod in mods]
Expand Down Expand Up @@ -408,7 +408,7 @@ def timeout_session_creator( # pylint: disable=unused-variable

def test_meta_schedule_local_runner_time_out():
"""Test meta schedule Local Runner time out"""
mod = MatmulModule()
mod = MatmulModule
builder = LocalBuilder()
(builder_result,) = builder.build([BuilderInput(mod, Target("llvm"))])
assert builder_result.artifact_path is not None
Expand Down Expand Up @@ -508,7 +508,7 @@ def exception_session_creator( # pylint: disable=unused-variable

def test_meta_schedule_local_runner_exception():
"""Test meta schedule Local Runner time out"""
mod = MatmulModule()
mod = MatmulModule
builder = LocalBuilder()
(builder_result,) = builder.build([BuilderInput(mod, Target("llvm"))])
assert builder_result.artifact_path is not None
Expand Down Expand Up @@ -833,7 +833,7 @@ def test_run_evaluator(
return costs

# Build the module
mod = AddModule()
mod = AddModule
builder = LocalBuilder()
(builder_result,) = builder.build([BuilderInput(mod, Target("llvm"))])
assert builder_result.artifact_path is not None
Expand Down

0 comments on commit 47095d7

Please sign in to comment.