|
tvm
|
An object representing a storage allocation. More...
#include <memory_manager.h>
Public Member Functions | |
| TVM_RUNTIME_DLL Tensor | AllocTensor (int64_t offset, ffi::Shape shape, DLDataType dtype) |
| Allocate an Tensor from a given piece of storage. | |
| TVM_RUNTIME_DLL Tensor | AllocTensorScoped (int64_t offset, ffi::Shape shape, DLDataType dtype, ffi::String scope="global") |
| Allocate an Tensor with memory scope from a given piece of storage. | |
| ~StorageObj () | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("vm.Storage", StorageObj, ffi::Object) | |
Public Attributes | |
| Buffer | buffer |
| The index into the VM function table. | |
| Allocator * | allocator = nullptr |
| The allocator where the storage buffer is allocated from. | |
Static Public Attributes | |
| static constexpr const bool | _type_mutable = true |
An object representing a storage allocation.
|
inline |
| TVM_RUNTIME_DLL Tensor tvm::runtime::memory::StorageObj::AllocTensor | ( | int64_t | offset, |
| ffi::Shape | shape, | ||
| DLDataType | dtype | ||
| ) |
Allocate an Tensor from a given piece of storage.
| TVM_RUNTIME_DLL Tensor tvm::runtime::memory::StorageObj::AllocTensorScoped | ( | int64_t | offset, |
| ffi::Shape | shape, | ||
| DLDataType | dtype, | ||
| ffi::String | scope = "global" |
||
| ) |
Allocate an Tensor with memory scope from a given piece of storage.
| tvm::runtime::memory::StorageObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "vm.Storage" | , |
| StorageObj | , | ||
| ffi::Object | |||
| ) |
The allocator where the storage buffer is allocated from.
| Buffer tvm::runtime::memory::StorageObj::buffer |
The index into the VM function table.