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

Method main

tests/python/relax/test_vm_builtin_lower.py:32–42  ·  view source on GitHub ↗
(x: R.Tensor(("m", "n"), "float32"))

Source from the content-addressed store, hash-verified

30 class Before:
31 @R.function
32 def main(x: R.Tensor(("m", "n"), "float32")) -> R.Tensor:
33 R.func_attr({"relax.force_pure": True})
34 m, n = T.int64(), T.int64()
35
36 storage = R.memory.alloc_storage(R.shape([m * n * 4]), 0, "global", "uint8")
37 alloc = R.memory.alloc_tensor(storage, 0, R.shape([m, n]), "float32")
38 _ = R.call_packed(
39 "test.op.identity", x, alloc, sinfo_args=(R.Tensor(ndim=2, dtype="float32"))
40 )
41 gv0 = alloc
42 return gv0
43
44 @I.ir_module
45 class Expected:

Callers 1

Calls 4

TensorMethod · 0.80
call_packedMethod · 0.80
shapeMethod · 0.45
reshapeMethod · 0.45

Tested by

no test coverage detected