torch.cuda.green_contexts.is_localization_supported#
- torch.cuda.green_contexts.is_localization_supported(device_id=None)[source]#
Return whether the software supports localization on a multi-domain GPU.
Returns
Falsewhen the required software is unavailable or the device has at most one locality domain. Before driver initialization, attempts a best-effort NVML capability check based on architecture and system configuration, raising if NVML cannot determine support. Once the driver is initialized, queries CUDA directly; invalid devices and failed queries raise. This function does not initialize the driver or a context and does not poison subsequent forks. Splitting and context creation always use CUDA to validate the actual resources.The NVML check does not support predicting a later attachment to an MPS server. Do not reuse a pre-initialization result after such an attachment; query again instead. An already attached MPS client has initialized CUDA, so subsequent queries use the driver path and its actual device topology.