MCPcopy
hub / github.com/apache/tvm / test_stmt_mutator

Function test_stmt_mutator

tests/python/tirx-transform/test_tir_functor.py:388–397  ·  view source on GitHub ↗

Test basic statement mutator functionality

()

Source from the content-addressed store, hash-verified

386
387
388def test_stmt_mutator():
389 """Test basic statement mutator functionality"""
390 x = Var("x", dtype="int32")
391 stmt = Evaluate(Add(x, IntImm("int32", 1)))
392
393 unroller = ForLoopUnroller()
394 result = unroller.visit_stmt(stmt)
395
396 # Should return the same statement (no actual unrolling implemented)
397 assert isinstance(result, Evaluate)
398
399
400def test_nested_expressions():

Callers

nothing calls this directly

Calls 6

VarClass · 0.90
EvaluateClass · 0.90
AddClass · 0.90
IntImmClass · 0.90
ForLoopUnrollerClass · 0.85
visit_stmtMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…