cuda.bindings._v2.driver.dev_resource_generate_desc#
- cuda.bindings._v2.driver.dev_resource_generate_desc(
- resources,
- unsigned int nb_resources,
Generate a resource descriptor.
Generates a single resource descriptor with the set of resources specified in
resources. The generated resource descriptor is necessary for the creation of green contexts via thecuGreenCtxCreateAPI. Resources of the same type can be passed in, provided they meet the requirements as noted below. A successful API call must have:.A valid output pointer for the
ph_descdescriptor as well as a valid array ofresourcespointers, with the array size passed innb_resources. If multiple resources are provided inresources, the device they came from must be the same, otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. If multiple resources are provided inresourcesand they are of typeCU_DEV_RESOURCE_TYPE_SM, they must be outputs (whetherresultorremaining) from the same split API instance and have the same smCoscheduledAlignment and localityDomainId values, otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned.
The output descriptor
ph_descwill remain valid for the lifetime of the process. Note: The API is not supported on 32-bit platforms.- Parameters:
resources (intptr_t) – Array of resources to be included in the descriptor.
nb_resources (unsigned int) – Number of resources passed in
resources.
- Returns:
Output descriptor.
- Return type:
intptr_t
See also
cuDevResourceGenerateDesc