cuda.core.WorkqueueResource#

class cuda.core.WorkqueueResource(*args, **kwargs)#

Represent a workqueue resource for a device or green context.

Merges CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG and CU_DEV_RESOURCE_TYPE_WORKQUEUE under one user-facing type. Instances are returned by DeviceResources.workqueue and cannot be instantiated directly.

Methods

__init__(*args, **kwargs)#
configure(
self,
WorkqueueResourceOptions options: WorkqueueResourceOptions,
) None#

Configure the workqueue resource in place.

Parameters:

options (WorkqueueResourceOptions) – Configuration options (sharing scope, concurrency limit).

Attributes

concurrency_limit#

Current expected maximum concurrent stream-ordered workloads.

Reflects the driver-populated wqConfig.wqConcurrencyLimit field. When first queried from a device, this matches the driver-reported cap (typically CUDA_DEVICE_MAX_CONNECTIONS). It can be updated via configure() with WorkqueueResourceOptions.concurrency_limit.

device#

The Device this workqueue resource is available on.

handle#

Return the address of the underlying config CUdevResource struct.

sharing_scope#

Current sharing scope of this workqueue resource.

Returns the WorkqueueSharingScopeType member corresponding to the driver-populated wqConfig.sharingScope field. It can be updated via configure() with WorkqueueResourceOptions.sharing_scope.