A worker in Disco. It takes a channel to communication with the controler. The worker can be run in a separate thread or process as long as the channel supports bi-directional communication in-between.
More...
#include <disco_worker.h>
A worker in Disco. It takes a channel to communication with the controler. The worker can be run in a separate thread or process as long as the channel supports bi-directional communication in-between.
◆ DiscoWorker()
tvm::runtime::DiscoWorker::DiscoWorker |
( |
int |
worker_id, |
|
|
int |
num_workers, |
|
|
int |
num_groups, |
|
|
WorkerZeroData * |
worker_zero_data, |
|
|
DiscoChannel * |
channel |
|
) |
| |
|
inlineexplicit |
Construct a worker.
- Parameters
-
worker_id | The id of the worker. |
num_workers | The number of the workers. |
num_groups | The number of the worker groups. |
worker_zero_data | The data shared between worker-0 and the controler. It's a nullptr if the worker is not worker-0. |
channel | The communication channel between the worker and the controler. |
◆ MainLoop()
void tvm::runtime::DiscoWorker::MainLoop |
( |
| ) |
|
◆ SetRegister()
void tvm::runtime::DiscoWorker::SetRegister |
( |
int |
reg_id, |
|
|
TVMArgValue |
value |
|
) |
| |
Set the specific register to a specific value.
◆ ThreadLocal()
static DiscoWorker* tvm::runtime::DiscoWorker::ThreadLocal |
( |
| ) |
|
|
static |
Get the worker instance on the current thread.
◆ DiscoWorker::Impl
friend struct DiscoWorker::Impl |
|
friend |
◆ ccl
String tvm::runtime::DiscoWorker::ccl |
The name of the underlying collective communication library.
◆ channel
The communication channel between the worker and the controler.
- Note
- This data structure is owned by the controler.
◆ default_device
Device tvm::runtime::DiscoWorker::default_device |
The default device to allocate data if not specified.
◆ local_worker_id
int tvm::runtime::DiscoWorker::local_worker_id |
The local id of the worker. This can be different from worker_id if the session is consisted with multiple sub-sessions.
◆ num_groups
int tvm::runtime::DiscoWorker::num_groups |
◆ num_workers
int tvm::runtime::DiscoWorker::num_workers |
◆ register_file
std::vector<TVMRetValue> tvm::runtime::DiscoWorker::register_file |
The registers in the worker.
◆ worker_id
int tvm::runtime::DiscoWorker::worker_id |
◆ worker_zero_data
The data shared between worker-0 and the controler. It's a nullptr if the worker is not worker-0.
- Note
- This data structure is owned by the controler.
The documentation for this class was generated from the following file: