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

python 接口没有提供使用GPU的入参 #395

Open
sithrxpeng opened this issue Mar 6, 2024 · 3 comments
Open

python 接口没有提供使用GPU的入参 #395

sithrxpeng opened this issue Mar 6, 2024 · 3 comments

Comments

@sithrxpeng
Copy link

pythonAPI是否可以增加入参,支持将3个模型的onnxruntime能够使用以下的入参来调用gpu
因为用CPU真的好慢,改成GPU快十几倍

self.session = ort.InferenceSession(onnx_path, providers=['CUDAExecutionProvider'])

@tunmx
Copy link
Collaborator

tunmx commented Mar 8, 2024

感谢提醒,我下次更新会添加它,谢谢

@zhouenxian
Copy link

建议直接出个tensorrt推理的版本吧,onnx 指定 providers=CUDAExecutionProvider推理速度并不具有优势,还是转为为tensorrt的.engine模型,然后用pycuda或者cudart推理才能真正发挥nvidai显卡的优势。

@ShuiFan0
Copy link

ShuiFan0 commented Nov 8, 2024

感谢提醒,我下次更新会添加它,谢谢

想要ncnn直接跨平台🤐

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

No branches or pull requests

4 participants