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

An object that exists on all workers. More...

#include <session.h>

Inheritance diagram for tvm::runtime::DRefObj:
Collaboration diagram for tvm::runtime::DRefObj:

Public Member Functions

 ~DRefObj ()
 
ffi::Any DebugGetFromRemote (int worker_id)
 Get the value of a DRef from a remote worker. More...
 
void DebugCopyFrom (int worker_id, ffi::AnyView source)
 Copy from the NDArray provided to a remote worker. More...
 
 TVM_FFI_DECLARE_STATIC_OBJECT_INFO (DRefObj, Object)
 

Public Attributes

int64_t reg_id
 The id of the register. More...
 
ObjectRef session {nullptr}
 Back-pointer to the host controler session. More...
 

Static Public Attributes

static constexpr const char * _type_key = "runtime.disco.DRef"
 
static constexpr const uint32_t _type_index = TypeIndex::kRuntimeDiscoDRef
 
static constexpr const bool _type_final = true
 

Detailed Description

An object that exists on all workers.

The controler assigns a unique "register id" to each object, and the worker uses this id to refer to the object residing on itself.

Constructor & Destructor Documentation

◆ ~DRefObj()

tvm::runtime::DRefObj::~DRefObj ( )
inline

\ brief Send dellocation command for reg_id

Member Function Documentation

◆ DebugCopyFrom()

void tvm::runtime::DRefObj::DebugCopyFrom ( int  worker_id,
ffi::AnyView  source 
)
inline

Copy from the NDArray provided to a remote worker.

Parameters
worker_idThe id of the worker to be copied to.
sourceThe NDArray to be copied.

◆ DebugGetFromRemote()

ffi::Any tvm::runtime::DRefObj::DebugGetFromRemote ( int  worker_id)
inline

Get the value of a DRef from a remote worker.

Parameters
worker_idThe id of the worker to be fetched from.
Returns
The value of the register.

◆ TVM_FFI_DECLARE_STATIC_OBJECT_INFO()

tvm::runtime::DRefObj::TVM_FFI_DECLARE_STATIC_OBJECT_INFO ( DRefObj  ,
Object   
)

Member Data Documentation

◆ _type_final

constexpr const bool tvm::runtime::DRefObj::_type_final = true
staticconstexpr

◆ _type_index

constexpr const uint32_t tvm::runtime::DRefObj::_type_index = TypeIndex::kRuntimeDiscoDRef
staticconstexpr

◆ _type_key

constexpr const char* tvm::runtime::DRefObj::_type_key = "runtime.disco.DRef"
staticconstexpr

◆ reg_id

int64_t tvm::runtime::DRefObj::reg_id

The id of the register.

◆ session

ObjectRef tvm::runtime::DRefObj::session {nullptr}

Back-pointer to the host controler session.


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