Closed mib32 closed 4 years ago
Thanks for the valuable feedback. Hope it looks better now. Also added a test for #unbind, because it's the other method that became wrapped in this PR.
Awesome, looks really great. Thanks @mib32!
Hey @mib32, just fyi, I recently profiled the library and found a significant amount of time was being spent deciding which LibTorch C++ function to call from Ruby. That logic's been moved to C++ (like PyTorch) on master, so you may want to see if it speeds up your training.
A rough micro benchmark calling add
1,000,000 times:
Version | Time (sec) | Note |
---|---|---|
0.3.6 | 20.3 | |
0.3.7 | 12.3 | Ruby optimizations, released today |
master | 4.4 | C++ version |
@ankane Aha! Yes, I will update right now. That's so very kind of you to notify 🌟
As discussed in #13. Big thanks for the directions! Will be happy to hear feedback and iterate.
This is a contribution from @riboseinc.