MCPcopy Create free account
hub / github.com/apache/tvm / elem_offset

Method elem_offset

python/tvm/relax/expr.py:299–310  ·  view source on GitHub ↗

Returns a proxy object for accessing a DLTensor's elem_offset This parameter is not stored in the DLTensor, but is instead derived from the DLTensor's byte offset and datatype. This is exposed in Relax for ease of use, and for translation into the `tirx::BufferNode:

(self)

Source from the content-addressed store, hash-verified

297
298 @property
299 def elem_offset(self) -> "Expr":
300 """Returns a proxy object for accessing a DLTensor's elem_offset
301
302 This parameter is not stored in the DLTensor, but is instead
303 derived from the DLTensor's byte offset and datatype. This is
304 exposed in Relax for ease of use, and for translation into the
305 `tirx::BufferNode::elem_offset` field when interacting with TIR
306 buffers.
307 """
308 self._check_for_tensor_struct_info()
309 op = tvm.ir.Op.get("relax.inspect.tensor_elem_offset")
310 return tvm.relax.Call(op, [self])
311
312
313class _DLTensorDTypeProxy(tvm.runtime.ObjectConvertible):

Callers

nothing calls this directly

Calls 2

getMethod · 0.45

Tested by

no test coverage detected