MCPcopy Index your code
hub / github.com/apache/tvm / test_empty_expressions

Function test_empty_expressions

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

Test handling of simple expressions

()

Source from the content-addressed store, hash-verified

367
368
369def test_empty_expressions():
370 """Test handling of simple expressions"""
371 counter = SimpleExprCounter()
372
373 # Test with just a variable
374 x = Var("x", dtype="int32")
375 counter.visit_expr(x)
376
377 assert counter.var_count == 1
378
379 # Test with just a constant
380 counter = SimpleExprCounter()
381 const = IntImm("int32", 5)
382 counter.visit_expr(const)
383
384 # Constants don't increase var_count
385 assert counter.var_count == 0
386
387
388def test_stmt_mutator():

Callers

nothing calls this directly

Calls 4

VarClass · 0.90
IntImmClass · 0.90
SimpleExprCounterClass · 0.85
visit_exprMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…