get_gpu_frames#
- Client.get_gpu_frames(peer_devices=())#
Zero-copy CuPy access to the server’s GPU movie buffers (Windows, same computer).
Call before start_acquisition. The returned GpuFrames holds both movie buffers as CuPy arrays (
.buffers) and the semaphores; iterating it yields each finished buffer asbatch.images(cupy float32, images x height x width, on GPU.device) andbatch.info(frame, scanX, scanY, valid per image). The buffer is released back to the server when the loop advances; the server’s processing waits while it is held, so close it when done (or use it in awithblock). Requires CuPy. See deapi.gpu_frames.peer_devices: other GPUs that will work on the frames. They read the buffers directly where the driver allows peer access (.peer_access), and their current streams are synchronized before each release either way.Only a process on the server computer can map the buffers; from another computer this raises with the server’s reason. Against deapi’s simulated server this returns a SimulatedGpuFrames instead: the same interface, with NumPy batches of the simulated dataset and no CuPy needed.