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

Handle non-python builds #1

Closed
dfalbel opened this issue Jan 10, 2022 · 1 comment
Closed

Handle non-python builds #1

dfalbel opened this issue Jan 10, 2022 · 1 comment

Comments

@dfalbel
Copy link
Member

dfalbel commented Jan 10, 2022

It seems that torchvision doesn't really support building the C++ library without linking to Python (see pytorch/vision#2692 ). To handle this we have a few options:

  • Patch libtorchvision so it doesn't require linking to Python. I have tried this approach and that wasn't too complicated, only commenting a few #include <Python.h> and modifying the cmake build infrastructure to make Python optional. (see dfalbel/vision@2a81375)
  • Vendor the parts of the code that interest us, currently mostly only the ops and possibly io and arrange our own build system for that. ops don't require Python at all, so we would be good with that.
  • Ask PyTorch Vision maintainers to support non-python builds. They look interested in doing that given the comments in Using torchvision C++ API without installing python pytorch/vision#2692 but the issue is sitting since 2020 there.
@dfalbel
Copy link
Member Author

dfalbel commented Jan 17, 2022

Fixed with: pytorch/vision#5190

@dfalbel dfalbel closed this as completed Jan 17, 2022
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

1 participant