getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.05k stars 64 forks source link

[Question] KeOps and TorchScript #154

Open Linux-cpp-lisp opened 3 years ago

Linux-cpp-lisp commented 3 years ago

Hi all,

Is it possible to use KeOps with PyTorch's TorchScript? This could include needing to load a generated .so containing generated kernels from a C++ program that loads the TorchScript model using libtorch. I'm thinking mostly about whether it is possible to have a PyTorch model that uses KeOps internally that you could then script, save, and run in a C++ deployment environment without any Python dependencies.

Thanks for your work on this very cool library!

jeanfeydy commented 3 years ago

Hi @Linux-cpp-lisp ,

Thanks for your interest in the library! As of today, unfortunately, we haven't interfaced KeOps with TorchScript. This is an important feature for deployment though, along the lines of #130, and we will certainly tackle it in the future. As detailed on our road map, we are currently revamping our compilation engine to streamline the process and eliminate most "problematic" dependencies. This should allow us to get a clearer picture for deployment and TorchScript integration this summer: we will update this issue as we make progress on the topic.

Best regards, Jean

Linux-cpp-lisp commented 3 years ago

Hi @jeanfeydy ,

Thanks for the response! That makes a lot of sense and I am looking forward to seeing how the updated compilation engine affects this.

Thanks!

mauicv commented 2 years ago

Hey @jeanfeydy, Thanks for your work on keops. Are there any updates on support for torchscript out of interest? Thanks, Alex