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.