tvm_ffi.use_raw_stream

Contents

tvm_ffi.use_raw_stream#

tvm_ffi.use_raw_stream(device, stream)[source]#

Create a ffi stream context with given device and stream handle.

Parameters:
  • device (Device) – The device to which the stream belongs.

  • stream (int | c_void_p) – The stream handle.

Return type:

StreamContext

Returns:

context – The ffi stream context.

Note

When working with torch stram or cuda graph, using tvm_ffi.use_torch_stream() instead.