Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
Fix bug in relax.vm.build to pass target argument. (#91)
Browse files Browse the repository at this point in the history
Co-authored-by: Prakalp Srivastava <prakalp@octoml.ai>
  • Loading branch information
2 people authored and junrushao committed Feb 8, 2023
1 parent 9355371 commit 6ff0632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/relax/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def foo(x: Tensor[(3, 4), "float32"], y: Tensor[(3, 4), "float32"]):

# split primfunc and relax function
rx_mod, tir_mod = _split_tir_relax(new_mod)
lib = tvm.build(tir_mod, target)
lib = tvm.build(tir_mod, target=target)
ex = _ffi_api.VMCodeGen(rx_mod)
return ex, lib

Expand Down
2 changes: 2 additions & 0 deletions tests/python/relax/test_autotir_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from tvm.meta_schedule.integration import extract_task_from_relax
from tvm import transform
import time
import pytest

# Test case with dynamic shape.
# Tuning with dynamic shape is not supported yet.
Expand Down Expand Up @@ -115,6 +116,7 @@ def print_results(self) -> None:
print("\n".join([str(r) for r in self.records]))


@pytest.mark.parametrize("dev", ["cpu"])
def test_class_irmodule(dev: str):
@tvm.script.ir_module
class InputModule:
Expand Down

0 comments on commit 6ff0632

Please sign in to comment.