MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / _wait

Function _wait

tinygrad/runtime/ops_webgpu.py:25–26  ·  view source on GitHub ↗
(future:webgpu.struct_WGPUFuture)

Source from the content-addressed store, hash-verified

23 return webgpu.WGPUStringView(data=ctypes.cast(ctypes.pointer(to_c_string(_str)), ctypes.POINTER(ctypes.c_char)), length=len(_str))
24
25def _wait(future:webgpu.struct_WGPUFuture):
26 assert webgpu.wgpuInstanceWaitAny(instance, 1, webgpu.WGPUFutureWaitInfo(future=future), 2**64-1) == webgpu.WGPUWaitStatus_Success, "Future failed"
27
28def write_buffer(device:WGPUDevPtr, buf:WGPUBufPtr, offset:int, src:memoryview|bytearray|bytes):
29 src = bytearray(src)

Callers 1

_runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…