cuda::experimental::places::locality_domain_ctx_cache#
-
class locality_domain_ctx_cache#
Cache of per-domain green contexts and stream pools.
For each device, splits the SM resource by locality domain via
cuDevSmResourceSplit(oneCU_DEV_SM_RESOURCE_GROUP_PARAMSper domain withCU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID), then creates one green context per domain. Each green context provides a primaryCUcontextused as the execution place’s context: streams created there are bound to the domain’s SM partition.Domain index
icorresponds directly to the domain ordinal used for localized memory, soexec_place::locality_domain(d, i)anddata_place::locality_domain(d, i)are co-located.Each SM split method (see
locality_domain_sm_split) gets its own set of green contexts, so places built with different methods for the same domain are distinct places with distinct SM partitions. On a device with a single domain (or when the driver cannot report domains) the method is ignored and every method maps to one whole-device green context.Entries are created lazily per (device, split method) and kept alive for the process, which also guarantees the (non-owning)
exec_place_cuda_ctx_implplaces built on top always refer to a live context. Thread-safe.Public Functions
- inline const domain_entry &get(
- int dev_id,
- int domain_id,
- locality_domain_sm_split split
Public Static Functions
-
static inline locality_domain_ctx_cache &instance()#
-
struct domain_entry#