Enum CUCtxFlags
Context creation flags.
The two LSBs of the flags parameter can be used to control how the OS thread, which owns the CUDA context at the time of an API call, interacts with the OS scheduler when waiting for results from the GPU.
Namespace: ManagedCuda.BasicTypes
Assembly: ManagedCuda.dll
Syntax
[Flags]
public enum CUCtxFlags
Fields
Name | Description |
---|---|
BlockingSync | Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work. |
FlagsMask | No description found... |
LMemResizeToMax | Instruct CUDA to not reduce local memory after resizing local memory for a kernel. This can prevent thrashing by local memory allocations when launching many kernels with high local memory usage at the cost of potentially increased memory usage. |
MapHost | Instruct CUDA to support mapped pinned allocations. This flag must be set in order to allocate pinned host memory that is accessible to the GPU. |
SchedAuto | The default value if the flags parameter is zero, uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical processors in the system P. If C > P, then CUDA will yield to other OS threads when waiting for the GPU, otherwise CUDA will not yield while waiting for results and actively spin on the processor. |
SchedMask | No description found... |
SchedSpin | Instruct CUDA to actively spin when waiting for results from the GPU. This can decrease latency when waiting for the GPU, but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread. |
SchedYield | Instruct CUDA to yield its thread when waiting for results from the GPU. This can increase latency when waiting for the GPU, but can increase the performance of CPU threads performing work in parallel with the GPU. |