cuda.bindings._v2.driver.device_primary_ctx_get_state#

cuda.bindings._v2.driver.device_primary_ctx_get_state(int dev) → tuple#

Get the state of the primary context.

Returns in *flags the flags for the primary context of dev, and in *active whether it is active. See cuDevicePrimaryCtxSetFlags for flag values.

Parameters:

dev (int) – Device to get primary context flags for.

Returns:

  • unsigned int: Pointer to store flags.

  • int: Pointer to store context state; 0 = inactive, 1 = active.

Return type:

A 2-tuple containing

See also

cuDevicePrimaryCtxGetState