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

Method func1

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

Source from the content-addressed store, hash-verified

811
812 @R.function
813 def func1(
814 x: R.Tensor((2, 3), dtype="float32"), y: R.Tensor((2, 3), dtype="int32")
815 ) -> R.Tensor((2, 3), dtype="float32"):
816 R.func_attr({"relax.force_pure": True})
817 cls = Module
818 alloc: R.Tensor((2, 3), dtype="float32") = R.builtin.alloc_tensor(
819 R.shape([2, 3]), dtype="float32", runtime_device_index=0
820 )
821 _: R.Tuple() = cls.add(x, x, alloc)
822 gv: R.Tensor((2, 3), dtype="float32") = alloc
823 alloc1: R.Tensor((2, 3), dtype="int32") = R.builtin.alloc_tensor(
824 R.shape([2, 3]), dtype="int32", runtime_device_index=0
825 )
826 _1: R.Tuple() = cls.add1(y, y, alloc1)
827 gv1: R.Tensor((2, 3), dtype="int32") = alloc1
828 return x
829
830 @R.function
831 def func2(

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected