cuda.core.SMResource#

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

Represent an SM (streaming multiprocessor) resource partition.

Instances are returned by DeviceResources.sm or SMResource.split() and cannot be instantiated directly.

Methods

__init__(*args, **kwargs)#
split(self, options, *, bool dry_run=False)#

Split this SM resource into groups and a remainder.

Parameters:
  • options (SMResourceOptions) – Split configuration (count, co-scheduling constraints).

  • dry_run (bool, optional) – If True, return filled-in metadata without creating usable resource objects. (Default to False)

Returns:

(groups, remainder) where each group holds a disjoint SM partition and remainder holds any unassigned SMs.

Return type:

tuple[list[SMResource], SMResource]

Attributes

coscheduled_alignment#

Number of SMs guaranteed to be co-scheduled.

flags#

Raw flags from the underlying SM resource.

handle#

Return the address of the underlying CUdevResource struct.

min_partition_size#

Minimum SM count required to create a partition.

sm_count#

Total SMs available in this resource.