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

Function rewriter

tests/python/relax/test_dataflow_pattern.py:892–893  ·  view source on GitHub ↗
(_, matchings)

Source from the content-addressed store, hash-verified

890 pattern = is_op("relax.add")(x, x)
891
892 def rewriter(_, matchings):
893 return R.multiply(matchings[x], R.const(2, "float32"))
894
895 rewritten = rewrite_call(pattern, rewriter, main)
896 tvm.ir.assert_structural_equal(rewritten, expected1.with_attr("global_symbol", "main"))

Calls 7

tupleFunction · 0.85
numpyMethod · 0.80
reduceMethod · 0.80
multiplyMethod · 0.45
matmulMethod · 0.45
permute_dimsMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…