with_stream

Function with_stream 

Source
pub unsafe fn with_stream<T>(
    device: &DLDevice,
    stream: TVMFFIStreamHandle,
    f: impl FnOnce() -> Result<T>,
) -> Result<T>
Expand description

Call f with the device stream temporarily set to stream.

ยงSafety

stream must be a valid stream handle for the given device, or null.