Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
shingjan committed Nov 2, 2021
1 parent 990dbf5 commit 8e26b1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/tvm/script/tir/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,4 @@ Annotations
def func_attr(attrs: Dict) -> None: ...
def block_attr(attrs: Dict) -> None: ...
def attr(node: PrimExpr, attr_key: str, value: PrimExpr) -> None: ...
def prim_func(input_func: Callable) -> PrimFunc: ...
def prim_func(input_func: Callable) -> PrimFunc: ...
8 changes: 4 additions & 4 deletions python/tvm/tir/schedule/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
from tvm import tir
from tvm.ir import IRModule, structural_equal
from tvm.tir import PrimFunc
from tvm.tir.schedule import Trace
from tvm.tir.schedule import Trace, Schedule


def verify_trace_roundtrip(
sch: tir.Schedule,
sch: Schedule,
mod: Union[PrimFunc, IRModule],
*,
debug_mask: Union[str, int] = "all",
) -> tir.Schedule:
) -> Schedule:
"""Serialize a traced schedule to JSON, then replay the JSON trace by applying to
a fresh new schedule, verifying the reproducibility of scheduling.
Expand All @@ -51,7 +51,7 @@ def verify_trace_roundtrip(
assert trace is not None
json_obj = trace.as_json()
# Step 2. Apply the JSON trace to a new schedule, then check if it reproduces the scheduling
new_sch = tir.Schedule(mod=mod, debug_mask=debug_mask)
new_sch = Schedule(mod=mod, debug_mask=debug_mask)
Trace.apply_json_to_schedule(json_obj=json_obj, sch=new_sch)
assert structural_equal(new_sch.mod, sch.mod)
# Step 3. Check the consistency of the text format between the old and new traces
Expand Down

0 comments on commit 8e26b1d

Please sign in to comment.