Managed reference to SessionObj.
More...
#include <session.h>
Managed reference to SessionObj.
- See also
- SessionObj
◆ ProcessSession()
| static TVM_RUNTIME_DLL Session tvm::runtime::Session::ProcessSession |
( |
int |
num_workers, |
|
|
int |
num_groups, |
|
|
ffi::String |
process_pool_creator, |
|
|
ffi::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()
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_OBJECT_REF_METHODS_NULLABLE()
| tvm::runtime::Session::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE |
( |
Session |
, |
|
|
ffi::ObjectRef |
, |
|
|
SessionObj |
|
|
) |
| |
The documentation for this class was generated from the following file: