|
| TVM_RUNTIME_DLL ffi::Tensor | tvm::runtime::Empty (ffi::Shape shape, DLDataType dtype, Device dev, ffi::Optional< ffi::String > mem_scope=std::nullopt) |
| | Allocate an uninitialized tensor through the runtime device allocator.
|
| |
| TVM_RUNTIME_DLL void | tvm::runtime::CopyFromTo (ffi::TensorView source, ffi::TensorView destination, TVMStreamHandle stream=nullptr) |
| | Copy between existing tensors with exactly matching byte sizes.
|
| |
| TVM_RUNTIME_DLL ffi::Tensor | tvm::runtime::CopyTo (ffi::TensorView source, Device dev, ffi::Optional< ffi::String > mem_scope=std::nullopt) |
| | Allocate a fresh tensor on dev, copy source, and synchronize the copy.
|
| |
| TVM_RUNTIME_DLL 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.
|
| |
| TVM_RUNTIME_DLL void | tvm::runtime::CopyFromBytes (ffi::TensorView destination, const void *source_bytes, size_t nbytes, TVMStreamHandle stream=nullptr) |
| | Copy exactly nbytes from a byte buffer into a contiguous tensor.
|
| |
| TVM_RUNTIME_DLL void | tvm::runtime::CopyToBytes (ffi::TensorView source, void *destination_bytes, size_t nbytes, TVMStreamHandle stream=nullptr) |
| | Copy a contiguous tensor into a byte buffer of exactly nbytes.
|
| |
| void | tvm::runtime::SaveTensor (ffi::TensorView source, support::Stream *strm) |
| | Save a tensor in the portable CPU tensor format.
|
| |
| ffi::Tensor | tvm::runtime::LoadTensor (support::Stream *strm) |
| | Load a tensor from the portable format into CPU storage.
|
| |
| Device | tvm::runtime::GetPreferredHostDevice (Device device) |
| | Get the preferred host device from the input device.
|
| |
| TVM_RUNTIME_DLL ffi::ObjectPtr< TensorMemoryPool > | tvm::runtime::CreateTensorMemoryPool (DLDevice device) |
| | Create the default pool for a device.
|
| |
Device-independent tensor allocation, copies, views and serialization.