Skip to main content

Module flags

Module flags 

Source
Expand description

Context scheduling flags passed to Context::with_flags.

These control how the CPU thread behaves while waiting for GPU operations.

Constantsยง

LMEM_RESIZE_TO_MAX
Keep local memory allocation after launch (deprecated flag kept for completeness).
MAP_HOST
Enable mapped pinned allocations in this context.
SCHED_AUTO
Let the driver choose the optimal scheduling policy.
SCHED_BLOCKING_SYNC
Block the calling thread on a synchronisation primitive. Lowest CPU usage but slightly higher latency.
SCHED_SPIN
Actively spin (busy-wait) while waiting for GPU results. Lowest latency but consumes a full CPU core.
SCHED_YIELD
Yield the CPU time-slice to other threads while waiting. Good for multi-threaded applications.