Managed reference to SessionObj.
More...
#include <session.h>
|
static Session | ThreadedSession (int num_workers, int num_groups) |
| Create a session backed by a thread pool of workers. More...
|
|
static Session | ProcessSession (int num_workers, int num_groups, String process_pool_creator, String entrypoint) |
| Create a session backed by pipe-based multiprocessing. More...
|
|
Managed reference to SessionObj.
- See also
- SessionObj
◆ ProcessSession()
static Session tvm::runtime::Session::ProcessSession |
( |
int |
num_workers, |
|
|
int |
num_groups, |
|
|
String |
process_pool_creator, |
|
|
String |
entrypoint |
|
) |
| |
|
static |
Create a session backed by pipe-based multiprocessing.
- Parameters
-
num_workers | The number of workers. |
num_groups | The number of worker groups. |
process_pool_creator | The name of a global function that takes num_workers as an input, and returns a ffi::Function, which takes an integer worker_id as the input and returns None. When worker-id is 0, it shuts down the process pool; Otherwise, it retursn a tuple (read_fd, writefd) used to communicate with the corresponding worker. |
entrypoint | The entrypoint of DiscoWorker main worker function. |
- Note
- Worker-0 is always co-located with the controler as a separate thread, and therefore worker-0 does not exist in the process pool.
◆ ThreadedSession()
static Session tvm::runtime::Session::ThreadedSession |
( |
int |
num_workers, |
|
|
int |
num_groups |
|
) |
| |
|
static |
Create a session backed by a thread pool of workers.
- Parameters
-
num_workers | The number of workers. |
num_groups | The number of worker groups. |
◆ TVM_FFI_DEFINE_MUTABLE_OBJECT_REF_METHODS()
tvm::runtime::Session::TVM_FFI_DEFINE_MUTABLE_OBJECT_REF_METHODS |
( |
Session |
, |
|
|
ObjectRef |
, |
|
|
SessionObj |
|
|
) |
| |
The documentation for this class was generated from the following file: