Skip to content

vllm.utils.platform_utils

Functions:

cuda_get_device_properties(device, names, init_cuda=False)

Get specified CUDA device property values without initializing CUDA in the current process.

cuda_is_in_bad_fork()

Check if this process was forked from one that had initialized CUDA.

torch reports CUDA as uninitialized in such a child, yet CUDA cannot be initialized there, nor in any process forked from it.

cuda_is_initialized()

Check if CUDA is initialized.

is_uva_available() cached

Check if Unified Virtual Addressing (UVA) is available.

num_compute_units(device_id=0) cached

Get the number of compute units of the current device.

xpu_is_initialized()

Check if XPU is initialized.