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

Compatibility with libtorch C++ API #13

Open
JSLJ23 opened this issue Nov 25, 2024 · 3 comments
Open

Compatibility with libtorch C++ API #13

JSLJ23 opened this issue Nov 25, 2024 · 3 comments

Comments

@JSLJ23
Copy link

JSLJ23 commented Nov 25, 2024

Hi, really cool work going on here on porting the e3nn logic to pure C. Just wondering will there be any future plans to support compatibility with the libtorch C++ API to allow for building equivariant models in pure torch C++?

I was looking to build some equivariant models that need to run in an environment without python so using the original e3nn-pyTorch or e3nn-Jax might not be possible.

If there might not be any plans to support libtorch compatibility, maybe are there any pointers / advice you could give on how something like this could be similarly implemented with libtorch C++ to take full advantage of autograd for building models?

@mitkotak
Copy link
Contributor

Thanks for the question !

Does the Torch2->C++ inference pipeline here help (https://github.com/atomicarchitects/e3nn_tetris) or did you also wanna train the model in C++ ?

@JSLJ23
Copy link
Author

JSLJ23 commented Nov 25, 2024

Yes ideally I need the whole training and inference to be in C++ as the model is going to be part of a larger code base that runs QM/NN/MM simulations.

@teddykoker
Copy link
Owner

Hi @JSLJ23 I have no plans regarding compatibility with the libtorch C++ API. I have no experience with it but it looks like it may be possible to train models that are exported with TorchScript in C++, so that could be one way to do things. Otherwise if you only need inference the C++ AOTInductor pipeline that @mitkotak mentioned could work (although I don't believe training is supported at the moment). Outside of that you could implement the e3nn operations using the C++ front end, and you might be able to borrow some of the ideas from e3nn.c.

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

3 participants