Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation failed (Ubuntu and MacOS) #16

Open
konstantin-korovin opened this issue Dec 23, 2024 · 2 comments
Open

installation failed (Ubuntu and MacOS) #16

konstantin-korovin opened this issue Dec 23, 2024 · 2 comments
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Comments

@konstantin-korovin
Copy link

konstantin-korovin commented Dec 23, 2024

Hello,

I tried to install ocaml-torch on Ubuntu and MacOS (M1) in different ways but all failed.
Any tips would be highly appreciated.

Thanks,
Konstantin

=====
Ubuntu 22.04.2 LTS


-- using opam (tried: ocaml 5.2.1, , 5.1.1+flambda, 5.1.0, 4.14.1+flambda)

> opam switch
5.2.1                      ocaml-base-compiler.5.2.1,ocaml-options-vanilla.1

>opam install libtorch
The following actions will be performed:
=== install 1 package
  ∗ libtorch 2.2.1+linux-x86_64

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved libtorch.2.2.1+linux-x86_64  (cached)
∗ installed libtorch.2.2.1+linux-x86_64
Done.

>opam install torch
The following actions will be performed:
=== remove 1 package
  ⊘ libtorch 2.2.1+linux-x86_64 [conflicts with torch]
=== install 1 package
  ∗ torch    v0.17.0

 ---------- 
 It seems that libtorch installed by opam is not compatible with ocaml-torch.

 I installed libtorch version 2.3.0 in a local directory and specified path via
 export LIBTORCH="..."

 ------
 > opam install torch

 [ERROR] The compilation of torch.v0.17.0 failed at "dune build -p torch -j 11".

#=== ERROR while compiling torch.v0.17.0 ======================================#
# context     2.3.0 | linux/x86_64 | ocaml-base-compiler.5.2.1 | https://opam.ocaml.org/#00a8aa58f1391751fbaaf6e212f6b33ac05b73fc
# path        ~/.opam/5.2.1/.opam-switch/build/torch.v0.17.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p torch -j 11
# exit-code   1
# env-file    ~/.opam/log/torch-3906737-b4ef23.env
# output-file ~/.opam/log/torch-3906737-b4ef23.out
### output ###
# [...]
# torch_api_generated.h:2014:73: note: expected ‘char *’ but argument is of type ‘const char *’
#  2014 | raw_tensor atg_segment_reduce_out(gc_tensor out, gc_tensor data, char * reduce, gc_tensor lengths, gc_tensor indices, gc_tensor offsets, int64_t axis, int unsafe, scalar initial);
#       |                                                                  ~~~~~~~^~~~~~
# torch_stubs_generated.c: In function ‘caml__2413_atg_stft_center’:
# torch_stubs_generated.c:35007:28: warning: passing argument 9 of ‘atg_stft_center’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
# 35007 |                    x33586, x33589, x33590, x33593, x33596);
#       |                            ^~~~~~
# In file included from torch_api.h:163,
#                  from torch_stubs_generated.c:1:
# torch_api_generated.h:2336:182: note: expected ‘char *’ but argument is of type ‘const char *’
#  2336 | raw_tensor atg_stft_center(gc_tensor self, int64_t n_fft, int64_t hop_length_v, int hop_length_null, int64_t win_length_v, int win_length_null, gc_tensor window, int center, char * pad_mode, int normalized, int onesided, int return_complex);
#       |                                                                                                                                                                               ~~~~~~~^~~~~~~~



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build torch v0.17.0
└─ 
┌─ The following changes have been performed
│ ⊘ remove libtorch 2.2.1+linux-x86_64
└─ 

<><> torch.v0.17.0 troubleshooting ><><><><><><><><><><><><><><><><><><><><><><>
=> Installation of ocaml-torch failed. This likely happened
   because there is no system installation of libtorch to compile
   OCaml bindings against. Please instal the CPU version of libtorch
   through opam, or the appropriate version of libtorch for your GPU
   through the official distribution.

-----------
I checked that LIBTORCH is correctly defined:

>ls  $LIBTORCH
bin  build-hash  build-version  include  lib  share

>cat  $LIBTORCH/build-version
2.3.0.dev20240315+cpu


======== installation from sources
torch-0.17.1

>opam install pyml yaml npy cmdliner
[ERROR] Package conflict!
  * No agreement on the version of ocaml:
    - (invariant) → ocaml-base-compiler = 5.2.1 → ocaml = 5.2.1
    - pyml → ocaml < 5.0
    You can temporarily relax the switch invariant with `--update-invariant'
 ....

 pyml yaml npy cmdliner --update-invariant
 
The following actions will be performed:
=== downgrade 3 packages
  ↘ ocaml                       5.2.1 to 5.1.1     [required by pyml, cmdliner, npy, yaml]
  ↘ ocaml-base-compiler         5.2.1 to 5.1.1     [required by ocaml]
  ↘ ocaml-compiler-libs         v0.17.0 to v0.12.4 [uses ocaml]
=== recompile 79 packages
  ↻ base                        v0.17.1            [uses ocaml]
  ↻ base-domains                base               [uses ocaml]
  ↻ base-nnp                    base               [uses base-domains]
  ↻ base_bigstring              v0.17.0            [uses ocaml]
  ↻ base_quickcheck             v0.17.0            [uses ocaml]
  ↻ bigarray-compat             1.1.0              [uses ocaml]
  ↻ bin_prot                    v0.17.0            [uses ocaml]
  ↻ capitalization              v0.17.0            [uses ocaml]
  ↻ core                        v0.17.1            [uses ocaml]
  ↻ core_kernel                 v0.17.0            [uses ocaml]
  ↻ core_unix                   v0.17.0            [uses ocaml]
  ↻ csexp                       1.5.2              [uses ocaml]
  ↻ ctypes                      0.23.0             [uses ocaml]
  ↻ ctypes-foreign              0.23.0             [uses ocaml]
  ↻ dune                        3.17.1             [uses ocaml]
  ↻ dune-configurator           3.17.1             [uses ocaml]
  ↻ expect_test_helpers_core    v0.17.0            [uses ocaml]
  ↻ fieldslib                   v0.17.0            [uses ocaml]
  ↻ gel                         v0.17.0            [uses ocaml]
  ↻ int_repr                    v0.17.0            [uses ocaml]
  ↻ integers                    0.7.0              [uses ocaml]
  ↻ jane-street-headers         v0.17.0            [uses ocaml]
  ↻ jst-config                  v0.17.0            [uses ocaml]
  ↻ num                         1.5-1              [uses ocaml]
  ↻ ocaml-config                3                  [uses ocaml-base-compiler]
  ↻ ocaml_intrinsics_kernel     v0.17.1            [uses ocaml]
  ↻ parsexp                     v0.17.0            [uses ocaml]
  ↻ ppx_assert                  v0.17.0            [uses ocaml]
  ↻ ppx_base                    v0.17.0            [uses ocaml]
  ↻ ppx_bench                   v0.17.0            [uses ocaml]
  ↻ ppx_bin_prot                v0.17.0            [uses ocaml]
  ↻ ppx_cold                    v0.17.0            [uses ocaml]
  ↻ ppx_compare                 v0.17.0            [uses ocaml]
  ↻ ppx_custom_printf           v0.17.0            [uses ocaml]
  ↻ ppx_derivers                1.2.1              [uses ocaml]
  ↻ ppx_diff                    v0.17.0            [uses ocaml]
  ↻ ppx_disable_unused_warnings v0.17.0            [uses ocaml]
  ↻ ppx_enumerate               v0.17.0            [uses ocaml]
  ↻ ppx_expect                  v0.17.2            [uses ocaml]
  ↻ ppx_fields_conv             v0.17.0            [uses ocaml]
  ↻ ppx_fixed_literal           v0.17.0            [uses ocaml]
  ↻ ppx_globalize               v0.17.0            [uses ocaml]
  ↻ ppx_hash                    v0.17.0            [uses ocaml]
  ↻ ppx_here                    v0.17.0            [uses ocaml]
  ↻ ppx_ignore_instrumentation  v0.17.0            [uses ocaml]
  ↻ ppx_inline_test             v0.17.0            [uses ocaml]
  ↻ ppx_jane                    v0.17.0            [uses ocaml]
  ↻ ppx_let                     v0.17.0            [uses ocaml]
  ↻ ppx_log                     v0.17.0            [uses ocaml]
  ↻ ppx_module_timer            v0.17.0            [uses ocaml]
  ↻ ppx_optcomp                 v0.17.0            [uses ocaml]
  ↻ ppx_optional                v0.17.0            [uses ocaml]
  ↻ ppx_pipebang                v0.17.0            [uses ocaml]
  ↻ ppx_sexp_conv               v0.17.0            [uses ocaml]
  ↻ ppx_sexp_message            v0.17.0            [uses ocaml]
  ↻ ppx_sexp_value              v0.17.0            [uses ocaml]
  ↻ ppx_stable                  v0.17.0            [uses ocaml]
  ↻ ppx_stable_witness          v0.17.0            [uses ocaml]
  ↻ ppx_string                  v0.17.0            [uses ocaml]
  ↻ ppx_string_conv             v0.17.0            [uses ocaml]
  ↻ ppx_tydi                    v0.17.0            [uses ocaml]
  ↻ ppx_typerep_conv            v0.17.0            [uses ocaml]
  ↻ ppx_variants_conv           v0.17.0            [uses ocaml]
  ↻ ppxlib                      0.33.0             [uses ocaml]
  ↻ ppxlib_jane                 v0.17.0            [uses ocaml]
  ↻ re                          1.12.0             [uses ocaml]
  ↻ seq                         base               [uses ocaml]
  ↻ sexp_pretty                 v0.17.0            [uses ocaml]
  ↻ sexplib                     v0.17.0            [uses ocaml]
  ↻ sexplib0                    v0.17.0            [uses ocaml]
  ↻ spawn                       v0.17.0            [uses ocaml]
  ↻ splittable_random           v0.17.0            [uses ocaml]
  ↻ stdio                       v0.17.0            [uses ocaml]
  ↻ stdlib-shims                0.3.0              [uses ocaml]
  ↻ time_now                    v0.17.0            [uses ocaml]
  ↻ timezone                    v0.17.0            [uses ocaml]
  ↻ typerep                     v0.17.1            [uses ocaml]
  ↻ uopt                        v0.17.0            [uses ocaml]
  ↻ variantslib                 v0.17.0            [uses ocaml]
=== install 17 packages
  ∗ astring                     0.8.5              [required by bos]
  ∗ bos                         0.2.1              [required by yaml]
  ∗ camlzip                     1.13               [required by npy]
  ∗ cmdliner                    1.3.0
  ∗ conf-autoconf               0.2                [required by stdcompat]
  ∗ conf-zlib                   1                  [required by camlzip]
  ∗ fmt                         0.9.0              [required by bos]
  ∗ fpath                       0.7.3              [required by bos]
  ∗ logs                        0.7.0              [required by bos]
  ∗ npy                         0.0.9
  ∗ ocamlbuild                  0.15.0             [required by bos]
  ∗ ocamlfind                   1.9.6              [required by pyml]
  ∗ pyml                        20231101
  ∗ rresult                     0.7.0              [required by bos]
  ∗ stdcompat                   19                 [required by pyml]
  ∗ topkg                       1.0.7              [required by bos]
  ∗ yaml                        3.2.0

Proceed with ↘ 3 downgrades, ↻ 79 recompilations and ∗ 17 installations? [y/n] y

>opam switch set-invariant
-----------
torch-0.17.1$ make
dune build
File "src/wrapper/dune", line 4, characters 9-18:
4 |   (names torch_api)
             ^^^^^^^^^
In file included from torch_api.cpp:10:
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_jagged_dummy(gc_tensor)’:
torch_api_generated.cpp:2111:38: error: ‘_nested_get_jagged_dummy’ is not a member of ‘torch’
 2111 |     torch::Tensor results__ = torch::_nested_get_jagged_dummy(tensor_from_ocaml(any));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_lengths(gc_tensor)’:
torch_api_generated.cpp:2118:38: error: ‘_nested_get_lengths’ is not a member of ‘torch’
 2118 |     torch::Tensor results__ = torch::_nested_get_lengths(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_offsets(gc_tensor)’:
torch_api_generated.cpp:2125:38: error: ‘_nested_get_offsets’ is not a member of ‘torch’
 2125 |     torch::Tensor results__ = torch::_nested_get_offsets(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘int64_t atg__nested_get_ragged_idx(gc_tensor)’:
torch_api_generated.cpp:2132:19: error: ‘_nested_get_ragged_idx’ is not a member of ‘torch’
 2132 |     return torch::_nested_get_ragged_idx(tensor_from_ocaml(self));
      |                   ^~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_values(gc_tensor)’:
torch_api_generated.cpp:2139:38: error: ‘_nested_get_values’ is not a member of ‘torch’
 2139 |     torch::Tensor results__ = torch::_nested_get_values(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_values_copy(gc_tensor)’:
torch_api_generated.cpp:2146:38: error: ‘_nested_get_values_copy’ is not a member of ‘torch’
 2146 |     torch::Tensor results__ = torch::_nested_get_values_copy(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_values_copy_out(gc_tensor, gc_tensor)’:
torch_api_generated.cpp:2154:38: error: ‘_nested_get_values_copy_out’ is not a member of ‘torch’
 2154 |     torch::Tensor results__ = torch::_nested_get_values_copy_out(out_local, tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_view_from_jagged(gc_tensor, gc_tensor, gc_tensor, gc_tensor, int64_t)’:
torch_api_generated.cpp:2197:38: error: ‘_nested_view_from_jagged’ is not a member of ‘torch’
 2197 |     torch::Tensor results__ = torch::_nested_view_from_jagged(tensor_from_ocaml(self), tensor_from_ocaml(offsets), tensor_from_ocaml(dummy), lengths ? tensor_from_ocaml(lengths) : torch::Tensor(), ragged_idx);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_view_from_jagged_copy(gc_tensor, gc_tensor, gc_tensor, gc_tensor, int64_t)’:
torch_api_generated.cpp:2204:38: error: ‘_nested_view_from_jagged_copy’ is not a member of ‘torch’
 2204 |     torch::Tensor results__ = torch::_nested_view_from_jagged_copy(tensor_from_ocaml(self), tensor_from_ocaml(offsets), tensor_from_ocaml(dummy), lengths ? tensor_from_ocaml(lengths) : torch::Tensor(), ragged_idx);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_view_from_jagged_copy_out(gc_tensor, gc_tensor, gc_tensor, gc_tensor, gc_tensor, int64_t)’:
torch_api_generated.cpp:2212:38: error: ‘_nested_view_from_jagged_copy_out’ is not a member of ‘torch’
 2212 |     torch::Tensor results__ = torch::_nested_view_from_jagged_copy_out(out_local, tensor_from_ocaml(self), tensor_from_ocaml(offsets), tensor_from_ocaml(dummy), lengths ? tensor_from_ocaml(lengths) : torch::Tensor(), ragged_idx);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
Done: 94% (1277/1345, 68 left, 1 failed) (jobs: 1)  
make: *** [Makefile:4: default] Error 1

========

I tried different OCaml releases ( ocaml 5.2.1, , 5.1.1+flambda, 5.1.0, 4.14.1+flambda) with similar errors.

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Dec 23, 2024
@mwlon
Copy link

mwlon commented Dec 24, 2024

I think 0.17.0 was broken, but 0.17.1 should work. Can you try your second method (setting the LIBTORCH env var to a local directory), opam update, unpin torch if necessary, and reinstall v0.17.1 specifically?

@konstantin-korovin
Copy link
Author

Thanks @mwlon.

>cat  $LIBTORCH/build-version
2.3.0.dev20240315+cpu

opam install "torch=v0.17.1" -v --ignore-constraints-on libtorch
The following actions will be performed:
=== install 1 package
  ∗ torch v0.17.1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved torch.v0.17.1  (https://opam.ocaml.org/cache)
+ /shareddata/home/korovin/.opam/opam-init/hooks/sandbox.sh "build" "dune" "build" "-p" "torch" "-j" "11" (CWD=/shareddata/home/korovin/.opam/5.2.1/.opam-switch/build/torch.v0.17.1)
- File "src/wrapper/dune", line 4, characters 9-18:
- 4 |   (names torch_api)
-              ^^^^^^^^^
- (cd _build/default/src/wrapper && /usr/bin/gcc -std=c++17 -fPIC -D_GLIBCXX_USE_CXX11_ABI=1 -isystem /shareddata/home/korovin/libtorch-2.3.0/libtorch/include -isystem /shareddata/home/korovin/libtorch-2.3.0/libtorch/include/torch/csrc/api/include -g -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml -I /shareddata/home/korovin/.opam/5.2.1/lib/base -I /shareddata/home/korovin/.opam/5.2.1/lib/base/base_internalhash_types -I /shareddata/home/korovin/.opam/5.2.1/lib/base/md5 -I /shareddata/home/korovin/.opam/5.2.1/lib/base/shadow_stdlib -I /shareddata/home/korovin/.opam/5.2.1/lib/base_quickcheck -I /shareddata/home/korovin/.opam/5.2.1/lib/base_quickcheck/ppx_quickcheck/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/bigarray-compat -I /shareddata/home/korovin/.opam/5.2.1/lib/bin_prot -I /shareddata/home/korovin/.opam/5.2.1/lib/bin_prot/shape -I /shareddata/home/korovin/.opam/5.2.1/lib/ctypes -I /shareddata/home/korovin/.opam/5.2.1/lib/ctypes-foreign -I /shareddata/home/korovin/.opam/5.2.1/lib/ctypes/stubs -I /shareddata/home/korovin/.opam/5.2.1/lib/fieldslib -I /shareddata/home/korovin/.opam/5.2.1/lib/integers -I /shareddata/home/korovin/.opam/5.2.1/lib/jane-street-headers -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml/str -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml/threads -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml/unix -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml_intrinsics_kernel -I /shareddata/home/korovin/.opam/5.2.1/lib/parsexp -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_assert/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_bench/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_compare/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_enumerate/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/config -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/config_types -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/make_corrected_file -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_hash/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_here/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_inline_test/config -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_inline_test/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_log/syntax -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_log/types -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_module_timer/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_sexp_conv/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_stable_witness/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_stable_witness/stable_witness -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_string/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppxlib/print_diff -I /shareddata/home/korovin/.opam/5.2.1/lib/sexplib -I /shareddata/home/korovin/.opam/5.2.1/lib/sexplib0 -I /shareddata/home/korovin/.opam/5.2.1/lib/splittable_random -I /shareddata/home/korovin/.opam/5.2.1/lib/stdio -I /shareddata/home/korovin/.opam/5.2.1/lib/stdlib-shims -I /shareddata/home/korovin/.opam/5.2.1/lib/time_now -I /shareddata/home/korovin/.opam/5.2.1/lib/typerep -I /shareddata/home/korovin/.opam/5.2.1/lib/variantslib -I ../bindings -o torch_api.o -c torch_api.cpp)
- torch_api.cpp:2:10: fatal error: torch/torch.h: No such file or directory
-     2 | #include <torch/torch.h>
-       |          ^~~~~~~~~~~~~~~
- compilation terminated.

===========
It picks up correct libtorch paths and torch.h is in 
/shareddata/home/korovin/libtorch-2.3.0/libtorch/include/torch/csrc/api/include/torch/torch.h

If I run the same command from the failed build: 
>cd /shareddata/home/korovin/.opam/5.2.1/.opam-switch/build/torch.v0.17.1/_build/default/src/wrapper/

 /usr/bin/gcc -std=c++17 -fPIC -D_GLIBCXX_USE_CXX11_ABI=1 -isystem /shareddata/home/korovin/libtorch-2.3.0/libtorch/include -isystem /shareddata/home/korovin/libtorch-2.3.0/libtorch/include/torch/csrc/api/include -g -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml -I /shareddata/home/korovin/.opam/5.2.1/lib/base -I /shareddata/home/korovin/.opam/5.2.1/lib/base/base_internalhash_types -I /shareddata/home/korovin/.opam/5.2.1/lib/base/md5 -I /shareddata/home/korovin/.opam/5.2.1/lib/base/shadow_stdlib -I /shareddata/home/korovin/.opam/5.2.1/lib/base_quickcheck -I /shareddata/home/korovin/.opam/5.2.1/lib/base_quickcheck/ppx_quickcheck/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/bigarray-compat -I /shareddata/home/korovin/.opam/5.2.1/lib/bin_prot -I /shareddata/home/korovin/.opam/5.2.1/lib/bin_prot/shape -I /shareddata/home/korovin/.opam/5.2.1/lib/ctypes -I /shareddata/home/korovin/.opam/5.2.1/lib/ctypes-foreign -I /shareddata/home/korovin/.opam/5.2.1/lib/ctypes/stubs -I /shareddata/home/korovin/.opam/5.2.1/lib/fieldslib -I /shareddata/home/korovin/.opam/5.2.1/lib/integers -I /shareddata/home/korovin/.opam/5.2.1/lib/jane-street-headers -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml/str -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml/threads -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml/unix -I /shareddata/home/korovin/.opam/5.2.1/lib/ocaml_intrinsics_kernel -I /shareddata/home/korovin/.opam/5.2.1/lib/parsexp -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_assert/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_bench/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_compare/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_enumerate/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/config -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/config_types -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/make_corrected_file -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_expect/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_hash/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_here/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_inline_test/config -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_inline_test/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_log/syntax -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_log/types -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_module_timer/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_sexp_conv/runtime-lib -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_stable_witness/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_stable_witness/stable_witness -I /shareddata/home/korovin/.opam/5.2.1/lib/ppx_string/runtime -I /shareddata/home/korovin/.opam/5.2.1/lib/ppxlib/print_diff -I /shareddata/home/korovin/.opam/5.2.1/lib/sexplib -I /shareddata/home/korovin/.opam/5.2.1/lib/sexplib0 -I /shareddata/home/korovin/.opam/5.2.1/lib/splittable_random -I /shareddata/home/korovin/.opam/5.2.1/lib/stdio -I /shareddata/home/korovin/.opam/5.2.1/lib/stdlib-shims -I /shareddata/home/korovin/.opam/5.2.1/lib/time_now -I /shareddata/home/korovin/.opam/5.2.1/lib/typerep -I /shareddata/home/korovin/.opam/5.2.1/lib/variantslib -I ../bindings -o torch_api.o -c torch_api.cpp
In file included from torch_api.cpp:10:
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_jagged_dummy(gc_tensor)’:
torch_api_generated.cpp:2111:38: error: ‘_nested_get_jagged_dummy’ is not a member of ‘torch’
 2111 |     torch::Tensor results__ = torch::_nested_get_jagged_dummy(tensor_from_ocaml(any));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_lengths(gc_tensor)’:
torch_api_generated.cpp:2118:38: error: ‘_nested_get_lengths’ is not a member of ‘torch’
 2118 |     torch::Tensor results__ = torch::_nested_get_lengths(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_offsets(gc_tensor)’:
torch_api_generated.cpp:2125:38: error: ‘_nested_get_offsets’ is not a member of ‘torch’
 2125 |     torch::Tensor results__ = torch::_nested_get_offsets(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘int64_t atg__nested_get_ragged_idx(gc_tensor)’:
torch_api_generated.cpp:2132:19: error: ‘_nested_get_ragged_idx’ is not a member of ‘torch’
 2132 |     return torch::_nested_get_ragged_idx(tensor_from_ocaml(self));
      |                   ^~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_values(gc_tensor)’:
torch_api_generated.cpp:2139:38: error: ‘_nested_get_values’ is not a member of ‘torch’
 2139 |     torch::Tensor results__ = torch::_nested_get_values(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_values_copy(gc_tensor)’:
torch_api_generated.cpp:2146:38: error: ‘_nested_get_values_copy’ is not a member of ‘torch’
 2146 |     torch::Tensor results__ = torch::_nested_get_values_copy(tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_get_values_copy_out(gc_tensor, gc_tensor)’:
torch_api_generated.cpp:2154:38: error: ‘_nested_get_values_copy_out’ is not a member of ‘torch’
 2154 |     torch::Tensor results__ = torch::_nested_get_values_copy_out(out_local, tensor_from_ocaml(self));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_view_from_jagged(gc_tensor, gc_tensor, gc_tensor, gc_tensor, int64_t)’:
torch_api_generated.cpp:2197:38: error: ‘_nested_view_from_jagged’ is not a member of ‘torch’
 2197 |     torch::Tensor results__ = torch::_nested_view_from_jagged(tensor_from_ocaml(self), tensor_from_ocaml(offsets), tensor_from_ocaml(dummy), lengths ? tensor_from_ocaml(lengths) : torch::Tensor(), ragged_idx);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_view_from_jagged_copy(gc_tensor, gc_tensor, gc_tensor, gc_tensor, int64_t)’:
torch_api_generated.cpp:2204:38: error: ‘_nested_view_from_jagged_copy’ is not a member of ‘torch’
 2204 |     torch::Tensor results__ = torch::_nested_view_from_jagged_copy(tensor_from_ocaml(self), tensor_from_ocaml(offsets), tensor_from_ocaml(dummy), lengths ? tensor_from_ocaml(lengths) : torch::Tensor(), ragged_idx);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^
torch_api_generated.cpp: In function ‘c10::TensorImpl* atg__nested_view_from_jagged_copy_out(gc_tensor, gc_tensor, gc_tensor, gc_tensor, gc_tensor, int64_t)’:
torch_api_generated.cpp:2212:38: error: ‘_nested_view_from_jagged_copy_out’ is not a member of ‘torch’
 2212 |     torch::Tensor results__ = torch::_nested_view_from_jagged_copy_out(out_local, tensor_from_ocaml(self), tensor_from_ocaml(offsets), tensor_from_ocaml(dummy), lengths ? tensor_from_ocaml(lengths) : torch::Tensor(), ragged_idx);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
torch_api.h:17:5: note: in definition of macro ‘PROTECT’
   17 |     x                                                                                    \
      |     ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

No branches or pull requests

3 participants