MCPcopy Create free account
hub / github.com/apache/tvm / test_buffer_replacer_no_shared_default

Function test_buffer_replacer_no_shared_default

tests/python/tirx/test_op.py:47–57  ·  view source on GitHub ↗

Regression test for F4: BufferReplacer default dicts must not be shared.

()

Source from the content-addressed store, hash-verified

45
46
47def test_buffer_replacer_no_shared_default():
48 """Regression test for F4: BufferReplacer default dicts must not be shared."""
49 from tvm.tirx.transform.common import BufferReplacer
50
51 r1 = BufferReplacer()
52 r2 = BufferReplacer()
53 A = decl_buffer((64,), "float32")
54 B = decl_buffer((64,), "float32")
55 r1.buffer_map[A] = B
56 # r2 must not see r1's mutation
57 assert len(r2.buffer_map) == 0
58
59
60def test_gemm_async_partial_scale_factor():

Callers 1

test_op.pyFile · 0.85

Calls 2

BufferReplacerClass · 0.90
decl_bufferFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…