MCPcopy Create free account
hub / github.com/apache/tvm-ffi / __tvm_ffi_object__

Method __tvm_ffi_object__

tests/python/test_tensor.py:150–152  ·  view source on GitHub ↗

Implement __tvm_ffi_object__ protocol.

(self)

Source from the content-addressed store, hash-verified

148 self._tensor = tensor
149
150 def __tvm_ffi_object__(self) -> tvm_ffi.Tensor:
151 """Implement __tvm_ffi_object__ protocol."""
152 return self._tensor
153
154 data: npt.NDArray[Any] = np.zeros((10, 8, 4, 2), dtype="int32")
155 if not hasattr(data, "__dlpack__"):

Callers 1

convertFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected