25 #ifndef TVM_RUNTIME_DISCO_DISCO_WORKER_H_
26 #define TVM_RUNTIME_DISCO_DISCO_WORKER_H_
A bi-directional channel for controler-worker communication. This channel is primarily used to transf...
Definition: session.h:292
A worker in Disco. It takes a channel to communication with the controler. The worker can be run in a...
Definition: disco_worker.h:41
String ccl
The name of the underlying collective communication library.
Definition: disco_worker.h:82
DiscoWorker(int worker_id, int num_workers, int num_groups, WorkerZeroData *worker_zero_data, DiscoChannel *channel)
Construct a worker.
Definition: disco_worker.h:52
Device default_device
The default device to allocate data if not specified.
Definition: disco_worker.h:80
int local_worker_id
The local id of the worker. This can be different from worker_id if the session is consisted with mul...
Definition: disco_worker.h:74
static DiscoWorker * ThreadLocal()
Get the worker instance on the current thread.
friend struct DiscoWorker::Impl
Definition: disco_worker.h:97
int num_groups
Total number of workers.
Definition: disco_worker.h:78
int worker_id
The id of the worker.
Definition: disco_worker.h:71
void MainLoop()
Main loop of the worker.
std::vector< TVMRetValue > register_file
The registers in the worker.
Definition: disco_worker.h:95
int num_workers
Total number of workers.
Definition: disco_worker.h:76
DiscoChannel * channel
The communication channel between the worker and the controler.
Definition: disco_worker.h:93
WorkerZeroData * worker_zero_data
The data shared between worker-0 and the controler. It's a nullptr if the worker is not worker-0.
Definition: disco_worker.h:88
void SetRegister(int reg_id, TVMArgValue value)
Set the specific register to a specific value.
Reference to string objects.
Definition: string.h:98
A single argument value to PackedFunc. Containing both type_code and TVMValue.
Definition: packed_func.h:796
A special communication channel between controler and worker-0, assuming they are always collocated i...
Definition: session.h:309
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
DLDevice Device
Definition: ndarray.h:43
Type-erased function used across TVM API.
This file serves as the entry point of Disco and defines key data structures and interfaces.
A threadlocal wrapper of DiscoWorker.
Definition: disco_worker.h:103
DiscoWorker * worker
The Disco worker.
Definition: disco_worker.h:105
static ThreadLocalDiscoWorker * Get()
Get the threadlocal Disco worker.
Definition: disco_worker.h:110