MCPcopy Create free account
hub / github.com/apache/tvm-ffi / __init__

Method __init__

python/tvm_ffi/stream.py:51–55  ·  view source on GitHub ↗

Initialize a stream context with a device and stream handle.

(self, device: core.Device, stream: int | c_void_p)

Source from the content-addressed store, hash-verified

49 """
50
51 def __init__(self, device: core.Device, stream: int | c_void_p) -> None:
52 """Initialize a stream context with a device and stream handle."""
53 self.device_type = device.dlpack_device_type()
54 self.device_id = device.index
55 self.stream = stream
56
57 def __enter__(self) -> StreamContext:
58 """Enter the context and set the current stream."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected