Make this work with LibTorch 2.12#2
Conversation
This now successfully runs on LibTorch 2.12, producing a bindings file that compiles. I haven't built the adapter yet. Besides fixing some Claw bugs, I did the following: - arranged to use a binary LibTorch distribution, so you don't have to build PyTorch from source - created a patch for one LibTorch header file that was tickling a couple of Claw bugs, to work around them - tweaked the 'defwrapper' form to include names in 'torch::nn::' - added directions to the README
|
Ha ha, the joke was on me: getting the bindings file to compile was the easy part; the adapter was much harder. For starters, I had to make some changes to its The big problem was with inherited constructors. Example: Here Once that was done, there were just a few minor bugs in the adapter generation that I had to fix, and it built! 🚀 Then I had to get the shared library to load. That wasn't quite trivial either. The first problem was that Claw uses the Clang headers if available (see After that:
For the moment, I have hand-edited these out of the adapter and bindings files. I guess I'll patch the headers again to get rid of them. And with that — it loads!!! 🚀 🚀 🚀 Whew! Now let me try calling some functions... |
This now successfully runs on LibTorch 2.12, producing a bindings file that compiles. I haven't built the adapter yet. Besides fixing some Claw bugs, I did the following:
defwrapperform to include names intorch::nn::I'm opening this PR so you can see what I've been doing, but it isn't ready to merge yet. In fact — what's your feeling about this project? Do you want to keep control of it, or are you happy to let me take it over? If the latter, we can just consider my fork to be the official repo. Do you mind if I rename it to CL-Torch?