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

Method func2

tests/python/relax/test_transform_static_plan_block_memory.py:831–846  ·  view source on GitHub ↗
(
            x: R.Tensor((2, 3), dtype="float32"), y: R.Tensor((2, 3), dtype="float32")
        )

Source from the content-addressed store, hash-verified

829
830 @R.function
831 def func2(
832 x: R.Tensor((2, 3), dtype="float32"), y: R.Tensor((2, 3), dtype="float32")
833 ) -> R.Tensor((2, 3), dtype="float32"):
834 R.func_attr({"relax.force_pure": True})
835 cls = Module
836 alloc: R.Tensor((2, 3), dtype="float32") = R.builtin.alloc_tensor(
837 R.shape([2, 3]), dtype="float32", runtime_device_index=0
838 )
839 _: R.Tuple() = cls.add(x, x, alloc)
840 gv: R.Tensor((2, 3), dtype="float32") = alloc
841 alloc1: R.Tensor((2, 3), dtype="float32") = R.builtin.alloc_tensor(
842 R.shape([2, 3]), dtype="float32", runtime_device_index=0
843 )
844 _1: R.Tuple() = cls.add(y, y, alloc1)
845 gv1: R.Tensor((2, 3), dtype="float32") = alloc1
846 return x
847
848 @I.ir_module
849 class Expected:

Callers

nothing calls this directly

Calls 4

TensorMethod · 0.80
shapeMethod · 0.45
addMethod · 0.45
expMethod · 0.45

Tested by

no test coverage detected