tvm
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
tvm::runtime::memory::StorageObj Class Reference

An object representing a storage allocation. More...

#include <memory_manager.h>

Inheritance diagram for tvm::runtime::memory::StorageObj:
Collaboration diagram for tvm::runtime::memory::StorageObj:

Public Member Functions

Tensor AllocTensor (int64_t offset, ffi::Shape shape, DLDataType dtype)
 Allocate an Tensor from a given piece of storage. More...
 
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. More...
 
 ~StorageObj ()
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("vm.Storage", StorageObj, Object)
 

Public Attributes

Buffer buffer
 The index into the VM function table. More...
 
Allocatorallocator = nullptr
 The allocator where the storage buffer is allocated from. More...
 

Static Public Attributes

static constexpr const bool _type_mutable = true
 

Detailed Description

An object representing a storage allocation.

Constructor & Destructor Documentation

◆ ~StorageObj()

tvm::runtime::memory::StorageObj::~StorageObj ( )
inline

Member Function Documentation

◆ AllocTensor()

Tensor tvm::runtime::memory::StorageObj::AllocTensor ( int64_t  offset,
ffi::Shape  shape,
DLDataType  dtype 
)

Allocate an Tensor from a given piece of storage.

◆ AllocTensorScoped()

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_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::runtime::memory::StorageObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "vm.Storage"  ,
StorageObj  ,
Object   
)

Member Data Documentation

◆ _type_mutable

constexpr const bool tvm::runtime::memory::StorageObj::_type_mutable = true
staticconstexpr

◆ allocator

Allocator* tvm::runtime::memory::StorageObj::allocator = nullptr

The allocator where the storage buffer is allocated from.

◆ buffer

Buffer tvm::runtime::memory::StorageObj::buffer

The index into the VM function table.


The documentation for this class was generated from the following file: