tvm_ffi.StreamContext#
- class tvm_ffi.StreamContext(device, stream)[source]#
Bases:
object
Represent a stream context in the FFI system.
StreamContext helps setup ffi environment stream by python with statement. When entering with scope, it caches the current environment stream and setup the given new stream. When exiting with scope, it recovers the stream to the cached environment stream.
- Parameters:
Methods
__init__
(device, stream)Initialize a stream context with a device and stream handle.