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

new: allow users to override providers #214

Merged
merged 10 commits into from
May 3, 2024
Merged

new: allow users to override providers #214

merged 10 commits into from
May 3, 2024

Conversation

joein
Copy link
Member

@joein joein commented Apr 26, 2024

Supersedes #214, closes #52 and #97

Comment on lines +61 to +68
available_providers = ort.get_available_providers()
for provider in onnx_providers:
# check providers available
provider_name = provider if isinstance(provider, str) else provider[0]
if provider_name not in available_providers:
raise ValueError(
f"Provider {provider_name} is not available. Available providers: {available_providers}"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the available_providers check!

@NirantK
Copy link
Contributor

NirantK commented Apr 28, 2024

I'm pushing a few changes to README with suggestions for user facing API. Would love to hear what you think @joein!

@NirantK NirantK mentioned this pull request Apr 28, 2024
@joein joein changed the base branch from main to dev May 1, 2024 20:19
@joein joein changed the title new: add gpu support, allow users to override providers new: allow users to override providers May 2, 2024
@joein joein changed the base branch from dev to main May 3, 2024 11:32
@joein joein requested a review from generall May 3, 2024 14:59
@generall generall merged commit d8c5920 into main May 3, 2024
15 checks passed
@generall generall deleted the gpu-runtime branch May 3, 2024 16:31
@Gautam-Rajeev
Copy link

Hi @NirantK

This is an awesome addition but I'm not sure if it is being realized.
Have tried it in collab and it doesn't seem to be using GPU (only the CPU mem usage is increasing, GPU is remaining 0)

Have attached the collab link here - https://colab.research.google.com/drive/1I4Z547eE0utHmp2pxIgaLx0PXQhNFWdj?usp=sharing

Thanks a lot!

@joein
Copy link
Member Author

joein commented May 13, 2024

Hey @GautamR-Samagra, for some reason CUDAExecutionProvider has not been set in your notebook, we'll investigate it, thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Option for ONNX on GPU execution provider
4 participants