Function tvm::runtime::CreateView#
Defined in File tensor.h
Function Documentation#
-
ffi::Tensor tvm::runtime::CreateView(ffi::Tensor source, ffi::Shape shape, DLDataType dtype, uint64_t relative_byte_offset = 0)#
Create a compact view retaining ownership of source.
Note
The view must fit within the source’s storage extent.
- Parameters:
source – The owning source tensor, which must be compact.
shape – The view shape.
dtype – The view data type.
relative_byte_offset – Byte offset relative to the source’s byte offset.