Error in compiling torchx

My environment:

Erlang/OTP 27 [erts-15.2.7] [source] [64-bit] [smp:24:24] [ds:24:24:10] [async-threads:1] [jit:ns]

Elixir 1.18.4 (compiled with Erlang/OTP 27)

My mix deps:

{:axon, "~> 0.7.0"},
{:torchx, "~> 0.9.0"}

My os: windows 11.

My libtorch library: libtorch-2.4.0-cpu.zip

I’m learning the example in Axon docs. I want to use torchx backend in my windows computer. But I got an error when compiling torchx. It says “there is no CMakeLists.txt in _build/dev/lib/torchx/cmake directory.”

I found cmake function in deps/torchx/mix.exs file, it just create the ‘cmake’ directory:

File.mkdir_p!(cmake_build_dir)

And I add the following code after that:

File.cp!("CMakeLists.txt", Path.join(cmake_build_dir, "CMakeLists.txt"))

And then mix deps.compile torchx is going to work.

I wonder is this a bug, or, it’s my fault in using?


There is another issue. I am using VSCode, which seems to be incompatible with my ElixirLS plugin. ElixirLS compiles my dependencies on its own, causing some issues with the CMake cache. I am not sure what is going on.