Context Create Plugin#

The context_create plugin detects conditions that prevent the diagnostic process from creating a CUDA context on a selected physical GPU. A failure narrows the problem to GPU visibility, access, or CUDA initialization rather than computation under load; it does not distinguish a software configuration problem from an underlying hardware cause.

Availability and prerequisites#

context_create is available only when its plugin is loaded and the target is a supported physical GPU. It is not part of the numbered suites; request it by canonical name. As with every explicitly named GPU test, the built-in software deployment checks run first.

Behavior#

For every selected GPU, the plugin resolves the device from its PCI bus ID and attempts CUDA context creation. Failure can identify CUDA initialization or device-resolution problems, inaccessible GPUs, and configuration that prevents context creation.

Exclusive-process and prohibited compute modes require special interpretation. When context creation fails and the GPU is in either mode, the default behavior is to skip rather than claim a hardware failure. The ignore_exclusive parameter changes the handling of an otherwise skippable CUDA context result; it does not change the GPU’s compute mode. Ordinary command-line workflows should preserve the default and inspect the mode separately.

Parameters#

Context Create parameters#

Parameter

Type

Default

Description

is_allowed

Boolean

true

Allow the plugin to run. false produces a skipped result.

ignore_exclusive

Boolean

false

Treat the CUDA result that this plugin normally regards as an exclusive/prohibited-mode skip as a failure instead.

Examples#

Test context creation on GPUs 0 and 1:

$ dcgmi diag --run context_create --entity-id gpu:0,gpu:1

If the result is skipped because of compute mode, inspect the current mode before changing it:

$ dcgmi config --get --verbose

Results and failure conditions#

Context Create results#

Condition

Result or code

Interpretation

A CUDA context is created and destroyed on every selected GPU.

Pass

Basic CUDA initialization and context creation succeeded.

Context creation fails and the GPU mode does not explain the failure.

DCGM_FR_CUDA_CONTEXT; fail

Inspect the CUDA error in the diagnostic message. This establishes a context-creation problem, not its underlying hardware or software cause.

CUDA initialization or PCI-bus device resolution fails.

DCGM_FR_CUDA_API; fail

The plugin could not reach the context-creation step.

DCGM cannot obtain the selected GPU’s attributes.

DCGM_FR_DCGM_API; fail

This is a DCGM communication or data-retrieval failure.

Context creation is blocked by exclusive-process or prohibited compute mode under the default handling.

Skip

The plugin deliberately makes no health claim. Inspect the compute mode and active workload.

is_allowed=false.

DCGM_FR_TEST_DISABLED; skip

The plugin was disabled by configuration.

The run is interrupted.

DCGM_FR_ABORTED; skip

The test did not complete.

No GPU was selected, or an unexpected initialization error occurs.

DCGM_FR_EMPTY_GPU_LIST or DCGM_FR_INTERNAL; fail

Correct the selection or inspect the diagnostic log before drawing a conclusion about GPU health.

See also#

dcgmi diag, dcgmi config, Diagnostics, Software Deployment Checks