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

Method __init__

tests/python/test_tensor.py:146–148  ·  view source on GitHub ↗

Initialize the MyTensor.

(self, tensor: tvm_ffi.Tensor)

Source from the content-addressed store, hash-verified

144def test_tvm_ffi_tensor_compatible() -> None:
145 class MyTensor:
146 def __init__(self, tensor: tvm_ffi.Tensor) -> None:
147 """Initialize the MyTensor."""
148 self._tensor = tensor
149
150 def __tvm_ffi_object__(self) -> tvm_ffi.Tensor:
151 """Implement __tvm_ffi_object__ protocol."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected