Tensor/tensor.h missing from libtorch packages

Hi! :wave:

We are writing libtorch bindings for Elixir’s Nx - thank you for making it easily accessible - and we have noticed the precompiled libtorch archives, for both Linux and Mac, are missing the file “include/tensor/tensor.h”.

Am I missing some crucial step in setting this up? For now we are using aten.

EDIT: We are using a Makefile to build libtorch and perhaps that’s the root cause? We should be using CMake to build certain headers for us?

Thank you!

1 Like

Mystery cracked, sorry for the noise: there is a second include directory at include/torch/csrc/api/include. We fixed it by doing:

LIBTORCH_INCLUDE_PATH = $(LIBTORCH_DIR)/include/ $(LIBTORCH_DIR)/include/torch/csrc/api/include

I will be glad to send a PR to the docs if you think it is worth talking about a non-CMake build. Thanks!