-
Notifications
You must be signed in to change notification settings - Fork 193
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
OpenAI's CLIP & Torchvision #2030
Comments
Hi and thanks for trying out pythran. Pythran can only optimize functions that uses builtin Python constructs and/or reference supported modules, which doesn't include torchvision or OpenAI CLIP. That being said, it is possible that a particular computation-intensive function might be extracted from your project and built by pythran, then imported in your project. Hard to tell without the code :-) |
if it were possible to add just the torch/torchvision module as a supported module, I think that would help also actually |
I doubt Pythran could do anything better than Pytorch. What Pythran does is compile Python code to C++, while PyTorch's backend is already compiled, and even optimised for GPUs. Depending on your GPU, you might be able to speed it up by processing several images in parallel. |
I am working on a python project and in order to make it faster I've stumbled upon Pythran and it seems like a worthwhile solution. However, the python code that I would like to speed up requires importing OpenAI's CLIP model as well as torchvision. I have been battling for the past day on how to get it all to work and will continue to. I did come across the documentation for adding supported modules, but I'm not familiar with how to do those things. I wanted to be able to bring this to your attention because I doubt that I am the only person who would appreciate these functionalities. I hope to hear from you soon about this!
The text was updated successfully, but these errors were encountered: