TECHNOLOGY

Read CUDA stream priority as a scheduling hint

In this article
THE QUICK TAKE

Read CUDA stream priority with its supported range and dependencies; it is a kernel scheduling hint without preemption or deadline guarantees.

A latency-sensitive decode task uses a high-priority CUDA stream but still waits behind already running GPU work. Another experiment expects the same priority to accelerate a large copy. Neither observation alone indicates a broken scheduler. Stream priority is a documented hint with a narrower scope than preemption, transfer ordering or an application deadline guarantee.

Query the supported range

Use cudaDeviceGetStreamPriorityRange in the actual device context and preserve the returned endpoints. CUDA defines lower numerical values as higher priority; do not infer meaning from the sign or a familiar operating-system convention. A requested priority outside the effective supported choices does not create an additional hardware scheduling class merely because the application supplied a different number.

Keep flags independent

Priority and default-stream interaction are separate properties when creating a stream. A high-priority stream can still have dependencies imposed by its flags or explicit events. Record those relationships before attributing every delay to competing kernels. Priority cannot make a consumer correct before its required producer finishes, and removing the dependency to expose concurrency changes correctness rather than improving scheduling.

Respect already running work

The programming guide states that stream priorities do not preempt already executing work or guarantee a specific execution order. A long-running kernel can therefore remain relevant to a short task’s delay. Inspect whether the task was pending before available execution opportunities or waiting for a dependency. A priority label alone cannot distinguish those conditions.

Separate memory transfers

The documented hint primarily concerns kernel launches and may not be respected for memory transfers. Do not use a faster host submission or a changed copy interval as proof of priority-controlled copy-engine service. Preserve the actual device timeline and transfer direction. If a request waits on a large transfer, examine its dependency and resource use as their own mechanisms.

Evaluate the serving consequence

Compare completed short-task latency and the progress of competing work under representative overlap, retaining checked outputs and arrival times. An improvement can redistribute waiting rather than increase total completed work. Acceptance describes the observed response under the documented hint contract. It does not establish strict isolation, guaranteed deadlines or a portable rule that every lower-priority workload must wait until all high-priority requests finish.

Primary references

CUDA Asynchronous Execution.

CUDA Runtime Device Management.

Nsight Systems Timeline Collection.

Related reading: CUDA streams: express dependencies before asking for overlap; Throughput and latency: choosing a GPU operating point.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles