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

Method main

tests/python/relax/test_transform_static_plan_block_memory.py:1688–1697  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1686
1687 @R.function
1688 def main():
1689 cls = Before
1690 x = R.builtin.alloc_tensor(R.shape([16, 16]), dtype="float32", runtime_device_index=0)
1691 x1 = R.memory.view(x, [128], "float32", 0)
1692 x2 = R.memory.ensure_zero_offset(x1)
1693 y = R.builtin.alloc_tensor(R.shape([128]), dtype="float32", runtime_device_index=0)
1694 cls.tir_exp(x2, y)
1695 z = R.builtin.alloc_tensor(R.shape([128]), dtype="float32", runtime_device_index=0)
1696 cls.tir_exp(y, z)
1697 return z
1698
1699 @I.ir_module
1700 class Expected:

Callers

nothing calls this directly

Calls 8

TensorMethod · 0.80
dataflowMethod · 0.80
outputMethod · 0.80
shapeMethod · 0.45
viewMethod · 0.45
tir_expMethod · 0.45
dtypeMethod · 0.45
expMethod · 0.45

Tested by

no test coverage detected