tritonserver_rs

Macro run_in_context

Source
macro_rules! run_in_context {
    ($val: expr, $expr: expr) => { ... };
}
Expand description

Run cuda code (which should be run in sync + cuda context pinned) in asynchronous context.

First argument is an id of device to run function on; second is the code to run. All the variables will be moved.

If “gpu” feature is off just runs a code without context/blocking.