functorch icon indicating copy to clipboard operation
functorch copied to clipboard

libtorch

Open mkolodziejczyk-piap opened this issue 3 years ago • 3 comments

Hi, are there any plans for C++ libtorch interface? Regards,

mkolodziejczyk-piap avatar Apr 29 '22 09:04 mkolodziejczyk-piap

Currently, there are no plans. Do you have a particular use case for this?

Chillee avatar Apr 30 '22 06:04 Chillee

Basicly, C++ development. I want to speed up tensor manipulation/computation/autodiff. There's an option to use https://arrayfire.com and https://github.com/flashlight/flashlight , but I'd like smth more JAX-like. Could you please briefly describe what is needs to be done to prepare C++ interface?

mkolodziejczyk-piap avatar May 02 '22 07:05 mkolodziejczyk-piap

+1 for the c++ interface. My use case is to get per batch Jacobian (and possibly higher order derivatives).

I am not sure why the entire ATen/functorch is out-of-tree. For now, I am going through the annoying route of compiling from source and then copying the ATen/functorch into my project. Writing the actual c++ version of vmap is just 20 lines of code (assuming all arguments are flattened tensors), but mirroring all the stuff like DynamicLayer and TensorWrapper gives me headache.

Well, that was a long way of saying I'd appreciate a native c++ interface.

hugary1995 avatar Oct 10 '22 19:10 hugary1995