[Feature Request] Get device ids via get_available_device_ids() #20725
Labels
ep:CUDA
issues related to the CUDA execution provider
ep:OpenVINO
issues related to OpenVINO execution provider
ep:ROCm
questions/issues related to ROCm execution provider
feature request
request for unsupported feature or enhancement
Describe the feature request
I would like to have
onnxruntime.get_available_device_ids()
which returns a list of every device available.This method might return either a List[str] or a Dict that contains the execution providers as keys. I assume that List[str] is good enough as you cannot install CUDA and ROCM for example at the same time, that being said: it will only return the ids of a single execution provider based what is installed.
Related:
Describe scenario use case
I run a project that allows to pass the device_id via the CLI - at the moment I cannot validate the args, so this throws a
Failed to parse provider option "device_id"
on incorrect input.The text was updated successfully, but these errors were encountered: