Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Get device ids via get_available_device_ids() #20725

Open
henryruhs opened this issue May 18, 2024 · 0 comments
Open

[Feature Request] Get device ids via get_available_device_ids() #20725

henryruhs opened this issue May 18, 2024 · 0 comments
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

Comments

@henryruhs
Copy link

henryruhs commented May 18, 2024

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:

from openvino import Core

Core().available_devices()

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.

@henryruhs henryruhs added the feature request request for unsupported feature or enhancement label May 18, 2024
@github-actions github-actions bot added 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 labels May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant