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

Method add

tests/python/relax/test_base_py_module_printer.py:34–39  ·  view source on GitHub ↗

Simple addition function.

(self, x, y)

Source from the content-addressed store, hash-verified

32
33 @I.pyfunc
34 def add(self, x, y):
35 """Simple addition function."""
36 x_tvm = self._convert_pytorch_to_tvm(x)
37 y_tvm = self._convert_pytorch_to_tvm(y)
38 result = self.call_tir(self.add_tir, [x_tvm, y_tvm], out_sinfo=R.Tensor((5,), "float32"))
39 return self._convert_tvm_to_pytorch(result)
40
41 @I.pyfunc
42 def multiply(self, x, y):

Callers 1

main_relaxMethod · 0.45

Calls 4

call_tirMethod · 0.80
TensorMethod · 0.80

Tested by

no test coverage detected