The GPU-Resident Astronomy Pipeline
A GPU-resident astronomy pipeline keeps every stage of image analysis — load, align, subtract, detect, review — inside GPU memory instead of round-tripping through the CPU.
NVIDIAElizabeth GoodmanExplainer
Green contexts, available in the CUDA Driver API since 12.4 and the Runtime API since 13.1, let applications explicitly partition GPU execution resources such as SMs and workqueues. They are lightweight to create and destroy, do not implicitly synchronize unrelated work, and allow provisioning workqueues to reduce false dependencies. Streams are created from a green context rather than relying on implicit device state, making targeting explicit. Benchmarks on a Blackwell GPU show a critical kernel completing in 0.007 ms with green context partitioning, compared to 0.140 ms with high-priority streams and 3.727 ms with equal priority. The tradeoff is fewer SMs for the bulk workload, but green contexts are opt-in and can be adopted incrementally alongside existing CUDA code.
Applications create a green context by querying device resources, partitioning SMs and workqueues using cudaDevSmResourceSplit and cudaDevResourceGenerateDesc, then creating streams with cudaExecutionCtxStreamCreate and submitting work as usual. The green context isolates the targeted work to the assigned resources.
Green contexts allow explicit SM partitioning, enabling latency-sensitive kernels to run on dedicated SMs without waiting for bulk kernel blocks to drain, achieving sub-millisecond latency (0.007 ms vs 0.140 ms with stream priority alone on Blackwell GPU).
Green contexts also provision workqueue resources to reduce false dependencies between independent stream-ordered workloads, avoiding unintended serialization even when sufficient execution resources are available.
Green contexts are opt-in and additive; existing CUDA applications can continue to target the full device unchanged and adopt green contexts incrementally where finer control over execution is needed.
Stream priorities cannot preempt blocks already executing on SMs, so a high-priority kernel must wait for bulk kernel blocks to drain. Green contexts partition SMs, dedicating specific SMs to the critical kernel so it starts immediately without waiting.
Green contexts have been available in the Driver API since CUDA 12.4. Starting with CUDA 13.1, they are also accessible through the Runtime API via cudaGreenCtxCreate and cudaExecutionCtxStreamCreate.
Yes, green contexts are opt-in and additive. Existing applications can continue to target the full device unchanged and adopt green contexts incrementally where finer control over execution is needed.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
A GPU-resident astronomy pipeline keeps every stage of image analysis — load, align, subtract, detect, review — inside GPU memory instead of round-tripping through the CPU.
Bare metal gives engineers direct control over GPU, network, and virtualization layers, but it shifts elasticity and lifecycle work onto the team. This trade-off map shows when that bargain pays off.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.