Insights
Ultrasound GPU Buffers: Reuse Memory Only After the Last Consumer Finishes
Define separate host and device buffer lifetimes, tie CUDA completion events to frame generations, and test delayed consumers before accepting an ultrasound GPU pipeline.
By ALEVA · Orange County, California, USA
When may an acquisition pipeline overwrite a buffer that a GPU is still using? For ultrasound OEM development, this is a correctness question before it is a throughput question. A returned function call, an unchanged pointer and a completed frame are different observations.
NVIDIA's CUDA Runtime API 13.5 documentation explains that kernel launches are asynchronous with respect to the host, and that an Async suffix alone does not describe every transfer's synchronization behavior. Arguments and memory type matter. A design should therefore specify completion evidence rather than infer it from the function name. NVIDIA, API synchronization behavior.
Give each allocation its own release condition
Consider a proposed pipeline with a host RF staging buffer, a device input buffer and a device output buffer. The host buffer becomes reusable after the transfer has finished reading it. The device input remains occupied until every reconstruction consumer has finished reading it. The output remains occupied until its transfer or downstream consumer has completed. A single “frame submitted” flag cannot represent these different lifetimes.
For an acquisition interface that writes directly into GPU memory, also specify the interface's documented arrival, visibility and ownership handoff. A CUDA event recorded without the necessary acquisition dependency does not establish that an external producer has finished. This article does not prescribe an RDMA synchronization implementation.
Associate completion with a particular frame generation
A CUDA event captures work already submitted to its stream when it is recorded. Later work does not extend that record, and recording the event again replaces its captured state. Before its first record, an event represents no work; a successful query then is not proof that a frame was processed. Record a terminal event after the relevant consumers, associate it with the buffer's frame generation, and check completion and errors before authorizing host-side reuse. NVIDIA, event management.
Across streams, a consumer can wait for a producer's recorded event using cudaStreamWaitEvent. That orders subsequent work in the consumer stream; it is not a host-side wait for that consumer to finish. If several streams read one allocation, the release condition must cover them all. The proposed ownership contract should name those dependencies explicitly. NVIDIA, stream management.
Test an overwrite, not just an average frame rate
A reproducible conceptual trace makes the distinction visible. Assume transfer completion at logical step 2, reconstruction completion at step 6 and output-consumer completion at step 8. At step 3, only the host staging buffer is eligible for reuse. At step 7, the host and device input are eligible; the output is not. At step 8, all three are eligible. These are arbitrary logical steps, not measured latencies or a GPU simulation.
For an implementation test, alternate known input patterns with distinct frame identifiers, deliberately delay one consumer, and attempt early reuse. The expected result is an explicit refusal or backpressure, not a silently overwritten frame. Check output identity as well as numerical reconstruction results. Exercise repeated use of the same allocation and event across frame generations. Include cancellation and asynchronous-error paths; an error must not be interpreted as successful completion.
Make the trade-off an OEM acceptance decision
A larger pool permits more work in flight but consumes memory and cannot repair a missing dependency. Waiting after every operation simplifies sequencing but can remove useful overlap. Agree on bounded occupancy, overload behavior, ownership transitions and the evidence that releases each allocation before comparing architectures.
NVIDIA's public Holoscan Ultrasound Imaging repository illustrates a channel-data-to-GPU workflow, but labels its early v0.1 release for evaluation and learning, not production medical-device use or clinical validation. It is context, not evidence of ALEVA deployment or proof that a particular application's buffer lifetime is correct. NVIDIA Holoscan Ultrasound Imaging.
The proposed OEM/ODM handover should include the buffer ownership table, event-generation rules, error and shutdown behavior, reproducible delayed-consumer tests, and the tested GPU, driver and runtime versions. This is a verification proposal based on public documentation, not an ALEVA hardware benchmark or clinical claim.
Source dates and limits
CUDA Runtime API Reference Manual 13.5 and the manufacturer repository were checked November 12, 2026. The access date is not a publication date. These are manufacturer sources, not peer-reviewed studies. The logical trace is an original educational model; it does not execute CUDA or validate hardware. No confidential architecture, customer data or unpublished measurements are used.