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

Documentation for use on Apple Silicon #488

Open
l-monninger opened this issue May 24, 2022 · 25 comments
Open

Documentation for use on Apple Silicon #488

l-monninger opened this issue May 24, 2022 · 25 comments

Comments

@l-monninger
Copy link

I'm doing some development on an M1 Mac. And, I'm having some trouble installing LibTorch.

Though I assumed it wouldn't work, I tried just installing from the link that usually provides an x86_64 build. Of course, it didn't:

lib/libtorch.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

I've also tried installing follow the guide for the Metal Accelerated version. I also didn't expect this to work, and it did not.

I also don't see an obvious solution here.

So, what do I need to do? I'd be happy to provide additional docs if there's a solution.

@ssoudan
Copy link

ssoudan commented May 24, 2022

Hi,

have been using tch-rs on an M1 for a bit now.
Just created a repo: https://github.com/ssoudan/tch-m1 to show how I have been doing that.

Cheers,

@l-monninger
Copy link
Author

@ssoudan
This doesn't look nearly as complex as I was expecting! Thanks! I'll be interested to see if you try the Metal version at some point. How would think to do this for virtualenv?

@danieldk
Copy link
Contributor

This doesn't look nearly as complex as I was expecting! Thanks!

You can basically install (or unpack) the vanilla wheel for macOS ARM64 and take the lib and include directories from that. Then just set the LIBTORCH environment variable to whatever directory you put lib and include in.

I'll be interested to see if you try the Metal version at some point. How would think to do this for virtualenv?

That doesn't work. The C++ API is not fully stable. You need to get the declarations YAML file from Torch nightly, regenerate some Rust source files using the OCaml program in tch-rs/gen. After generating, you need to fix up parts of tch-rs and torch-sys that are not compatible anymore with the new definitions by hand. (To give an example, in nightly Torch the gelu functions take an argument of the GELU implementation to apply.)

@danieldk
Copy link
Contributor

By the way, if you are interested in the relative performance of tch-rs on the M1 and M1 Pro. I posted some benchmarks last October comparing the M1 and M1 Pro:

https://twitter.com/danieldekok/status/1453070009266315267

For an M1 compared to a Ryzen 5700X, see the slide Dutch model performance in:

https://danieldk.eu/Research/Presentations/clin2021.pdf

These benchmarks are using a multi-task transformer model, implemented using tch-rs in Rust.

If you are curious about MPS compared to PyTorch without MPS (which uses the AMX matrix multiplication co-processor), I am currently working on support for PyTorch with MPS in spaCy. So far the number are:

  • M1 Pro: MPS is 2.4x faster than without MPS (AMX)
  • M1 Max: MPS is 4.0x faster than without MPS (AMX)

See: https://twitter.com/danieldekok/status/1529057447700226048

This should also be roughly the ballpark, since the AMX co-processor in the M1 Pro/Max is ~2.4 TFLOPS single-precision, whereas the GPU in the Pro and Max are respectively ~5 TFLOPS and ~10 TFLOPS.

@brandonros
Copy link

@danieldk Are you saying tch-rs as is is able to benefit from libtorch if it is built with MPS support, or does work need to be done to be able to use the "mps" device (the way you can optionally use CUDA device?)

see #501

@danieldk
Copy link
Contributor

No, only from AMX through Accelerate. For MPS you need to use an mps device (for which support needs to be added).

@brandonros
Copy link

thanks. almost a 2 part problem to be honest.

mps device support needs to be added, and in order to get that done support for v1.13.0 would need to be introduced (currently only v1.11.0 and trying to go above causes build errors due to the auto generated C++ -> Rust headers or something)

thanks!

@sunilmallya
Copy link

I run into namespacing issue with pytorch, seems like this is a new thing. Any idea on how to solve this? perhaps it'd be great if you can share the lib/ include/ so that I can compile against that?

(tch-rs-demo) tch-m1 sunilmallya$ cargo run
Compiling libc v0.2.126
Compiling proc-macro2 v1.0.39
Compiling cfg-if v1.0.0
Compiling unicode-ident v1.0.0
Compiling pkg-config v0.3.25
Compiling cc v1.0.73
Compiling syn v1.0.95
Compiling autocfg v1.1.0
Compiling crc32fast v1.3.2
Compiling adler v1.0.2
Compiling anyhow v1.0.57
Compiling byteorder v1.4.3
Compiling rawpointer v0.2.1
Compiling ppv-lite86 v0.2.16
Compiling half v1.8.2
Compiling lazy_static v1.4.0
Compiling miniz_oxide v0.5.1
Compiling num-traits v0.2.15
Compiling num-integer v0.1.45
Compiling matrixmultiply v0.3.2
Compiling bzip2-sys v0.1.11+1.0.8
Compiling time v0.1.43
Compiling getrandom v0.2.6
Compiling flate2 v1.0.23
Compiling quote v1.0.18
Compiling rand_core v0.6.3
Compiling rand_chacha v0.3.1
Compiling rand v0.8.5
Compiling bzip2 v0.4.3
Compiling num-complex v0.4.1
Compiling ndarray v0.15.4
Compiling thiserror-impl v1.0.31
Compiling thiserror v1.0.31
Compiling zip v0.5.13
Compiling torch-sys v0.7.2
The following warnings were emitted during compilation:

warning: clang: warning: -Wl,-rpath=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:238:28: error: no member named 'autocast_to_full_precision' in 'at::Tensor'
warning: auto outputs
_ = self->autocast_to_full_precision((bool)cuda_enabled, (bool)cpu_enabled);
warning: ~~~~ ^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:245:28: error: no member named 'autocast_to_reduced_precision' in 'at::Tensor'
warning: auto outputs
= self->_autocast_to_reduced_precision((bool)cuda_enabled, (bool)cpu_enabled, at::ScalarType(cuda_dtype), at::ScalarType(cpu_dtype));
warning: ~~~~ ^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:406:29: error: no member named 'convert_indices_from_csr_to_coo' in namespace 'torch'; did you mean 'convert_indices_from_coo_to_csr_out'?
warning: auto outputs
= torch::_convert_indices_from_csr_to_coo(*crow_indices, *col_indices, (bool)out_int32, (bool)transpose);
warning: ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: _convert_indices_from_coo_to_csr_out
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: /Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:9603:31: note: '_convert_indices_from_coo_to_csr_out' declared here
warning: TORCH_API inline at::Tensor & convert_indices_from_coo_to_csr_out(at::Tensor & out, const at::Tensor & self, int64_t size, bool out_int32=false) {
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:413:29: error: no member named 'convert_indices_from_csr_to_coo_out' in namespace 'torch'
warning: auto outputs
= torch::convert_indices_from_csr_to_coo_out(*out, *crow_indices, *col_indices, (bool)out_int32, (bool)transpose);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:568:29: error: no member named 'efficientzerotensor' in namespace 'torch'
warning: auto outputs
= torch::_efficientzerotensor(torch::IntArrayRef(size_data, size_len), at::device(device_of_int(options_device)).dtype(at::ScalarType(options_kind)));
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:778:19: error: no member named '_has_same_storage_numel' in namespace 'torch'
warning: return torch::has_same_storage_numel(*self, *other);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:785:29: error: no member named 'histogramdd_bin_edges' in namespace 'torch'
warning: auto outputs
= torch::histogramdd_bin_edges(*self, torch::IntArrayRef(bins_data, bins_len), at::ArrayRef(range_data, range_len), (weight ? *weight : torch::Tensor()), (bool)density);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:798:29: error: no member named 'histogramdd_from_bin_cts' in namespace 'torch'
warning: auto outputs
= torch::histogramdd_from_bin_cts(*self, torch::IntArrayRef(bins_data, bins_len), at::ArrayRef(range_data, range_len), (weight ? *weight : torch::Tensor()), (bool)density);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:805:29: error: no member named 'histogramdd_from_bin_tensors' in namespace 'torch'
warning: auto outputs
= torch::_histogramdd_from_bin_tensors(*self, of_carray_tensor(bins_data, bins_len), (weight ? *weight : torch::Tensor()), (bool)density);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:833:19: error: no member named '_is_zerotensor' in namespace 'torch'
warning: return torch::_is_zerotensor(*self);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:840:12: error: no member named 'linalg_check_errors' in namespace 'torch'
warning: torch::linalg_check_errors(*info, std::string(api_name_ptr, api_name_len), (bool)is_matrix);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:861:29: error: no member named 'linalg_svd' in namespace 'torch'
warning: auto outputs
= torch::linalg_svd(*A, (bool)full_matrices, (bool)compute_uv);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:870:29: error: no member named 'linalg_svd_out' in namespace 'torch'
warning: auto outputs
= torch::linalg_svd_out(*U, *S, *Vh, *A, (bool)full_matrices, (bool)compute_uv);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:886:84: error: reference to type 'const at::Tensor' could not bind to an rvalue of type 'at::ScalarType'
warning: auto outputs
= torch::log_softmax_backward_data(*grad_output, *output, dim, at::ScalarType(input_dtype));
warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: /Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:3438:147: note: passing argument to parameter 'self' here
warning: TORCH_API inline at::Tensor log_softmax_backward_data(const at::Tensor & grad_output, const at::Tensor & output, int64_t dim, const at::Tensor & self) {
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:893:94: error: reference to type 'const at::Tensor' could not bind to an rvalue of type 'at::ScalarType'
warning: auto outputs
= torch::log_softmax_backward_data_out(*out, *grad_output, *output, dim, at::ScalarType(input_dtype));
warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: /Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:3443:171: note: passing argument to parameter 'self' here
warning: TORCH_API inline at::Tensor & log_softmax_backward_data_out(at::Tensor & out, const at::Tensor & grad_output, const at::Tensor & output, int64_t dim, const at::Tensor & self) {
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:958:29: error: no member named 'masked_softmax' in namespace 'torch'
warning: auto outputs
= torch::masked_softmax(*self, *mask);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:986:29: error: no member named 'native_multi_head_self_attention' in namespace 'torch'
warning: auto outputs
= torch::native_multi_head_self_attention(*query, *qkv_weight, *qkv_bias, *proj_weight, *proj_bias, (mask ? *mask : torch::Tensor()));
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:1000:29: error: no member named 'new_zeros_with_same_feature_meta' in namespace 'torch'
warning: auto outputs
= torch::new_zeros_with_same_feature_meta(*self, *other, self_num_batch_dims);
warning: ~~~~~~~^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: In file included from libtch/torch_api.cpp:1426:
warning: libtch/torch_api_generated.cpp.h:1129:269: error: too few arguments to function call, expected 10, have 9
warning: auto outputs
= torch::_slow_conv2d_backward_out(*grad_input, *grad_weight, *grad_bias, *grad_output, *self, *weight, torch::IntArrayRef(kernel_size_data, kernel_size_len), torch::IntArrayRef(stride_data, stride_len), torch::IntArrayRef(padding_data, padding_len));
warning: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
warning: x
warning: ^
warning: /Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:11223:71: note: '_slow_conv2d_backward_out' declared here
warning: TORCH_API inline ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> _slow_conv2d_backward_out(at::Tensor & grad_input, at::Tensor & grad_weight, at::Tensor & grad_bias, const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & weight, at::IntArrayRef kernel_size, at::IntArrayRef stride, at::IntArrayRef padding, const at::Tensor & finput) {
warning: ^
warning: fatal error: too many errors emitted, stopping now [-ferror-limit=]
warning: 20 errors generated.

error: failed to run custom build command for torch-sys v0.7.2

Caused by:
process didn't exit successfully: /Users/sunilmallya/workspace/rust-pt/tch-m1/target/debug/build/torch-sys-ad95260b291844e3/build-script-build (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=TORCH_CUDA_VERSION
cargo:rerun-if-env-changed=LIBTORCH
cargo:rustc-link-search=native=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/lib
cargo:rerun-if-changed=libtch/torch_api.cpp
cargo:rerun-if-changed=libtch/torch_api.h
cargo:rerun-if-changed=libtch/torch_api_generated.cpp.h
cargo:rerun-if-changed=libtch/torch_api_generated.h
cargo:rerun-if-changed=libtch/stb_image_write.h
cargo:rerun-if-changed=libtch/stb_image_resize.h
cargo:rerun-if-changed=libtch/stb_image.h
cargo:rerun-if-env-changed=LIBTORCH_CXX11_ABI
TARGET = Some("aarch64-apple-darwin")
OPT_LEVEL = Some("0")
HOST = Some("aarch64-apple-darwin")
CXX_aarch64-apple-darwin = None
CXX_aarch64_apple_darwin = None
HOST_CXX = None
CXX = None
CXXFLAGS_aarch64-apple-darwin = None
CXXFLAGS_aarch64_apple_darwin = None
HOST_CXXFLAGS = None
CXXFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("aes,crc,dit,dotprod,dpb,dpb2,fcma,fhm,flagm,fp16,frintts,jsconv,lor,lse,neon,paca,pacg,pan,pmuv3,ras,rcpc,rcpc2,rdm,sb,sha2,sha3,ssbs,vh")
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include" "-I" "/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/sunilmallya/workspace/rust-pt/tch-m1/target/debug/build/torch-sys-e9927d9e03b8bf15/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp"
cargo:warning=clang: warning: -Wl,-rpath=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/lib: 'linker' input unused [-Wunused-command-line-argument]
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:238:28: error: no member named 'autocast_to_full_precision' in 'at::Tensor'
cargo:warning= auto outputs
_ = self->autocast_to_full_precision((bool)cuda_enabled, (bool)cpu_enabled);
cargo:warning= ~~~~ ^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:245:28: error: no member named 'autocast_to_reduced_precision' in 'at::Tensor'
cargo:warning= auto outputs
= self->_autocast_to_reduced_precision((bool)cuda_enabled, (bool)cpu_enabled, at::ScalarType(cuda_dtype), at::ScalarType(cpu_dtype));
cargo:warning= ~~~~ ^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:406:29: error: no member named 'convert_indices_from_csr_to_coo' in namespace 'torch'; did you mean 'convert_indices_from_coo_to_csr_out'?
cargo:warning= auto outputs
= torch::_convert_indices_from_csr_to_coo(*crow_indices, *col_indices, (bool)out_int32, (bool)transpose);
cargo:warning= ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning= _convert_indices_from_coo_to_csr_out
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:9603:31: note: '_convert_indices_from_coo_to_csr_out' declared here
cargo:warning=TORCH_API inline at::Tensor & convert_indices_from_coo_to_csr_out(at::Tensor & out, const at::Tensor & self, int64_t size, bool out_int32=false) {
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:413:29: error: no member named 'convert_indices_from_csr_to_coo_out' in namespace 'torch'
cargo:warning= auto outputs
= torch::convert_indices_from_csr_to_coo_out(*out, *crow_indices, *col_indices, (bool)out_int32, (bool)transpose);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:568:29: error: no member named 'efficientzerotensor' in namespace 'torch'
cargo:warning= auto outputs
= torch::_efficientzerotensor(torch::IntArrayRef(size_data, size_len), at::device(device_of_int(options_device)).dtype(at::ScalarType(options_kind)));
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:778:19: error: no member named '_has_same_storage_numel' in namespace 'torch'
cargo:warning= return torch::has_same_storage_numel(*self, *other);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:785:29: error: no member named 'histogramdd_bin_edges' in namespace 'torch'
cargo:warning= auto outputs
= torch::histogramdd_bin_edges(*self, torch::IntArrayRef(bins_data, bins_len), at::ArrayRef(range_data, range_len), (weight ? *weight : torch::Tensor()), (bool)density);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:798:29: error: no member named 'histogramdd_from_bin_cts' in namespace 'torch'
cargo:warning= auto outputs
= torch::histogramdd_from_bin_cts(*self, torch::IntArrayRef(bins_data, bins_len), at::ArrayRef(range_data, range_len), (weight ? *weight : torch::Tensor()), (bool)density);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:805:29: error: no member named 'histogramdd_from_bin_tensors' in namespace 'torch'
cargo:warning= auto outputs
= torch::_histogramdd_from_bin_tensors(*self, of_carray_tensor(bins_data, bins_len), (weight ? *weight : torch::Tensor()), (bool)density);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:833:19: error: no member named '_is_zerotensor' in namespace 'torch'
cargo:warning= return torch::_is_zerotensor(*self);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:840:12: error: no member named 'linalg_check_errors' in namespace 'torch'
cargo:warning= torch::linalg_check_errors(*info, std::string(api_name_ptr, api_name_len), (bool)is_matrix);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:861:29: error: no member named 'linalg_svd' in namespace 'torch'
cargo:warning= auto outputs
= torch::linalg_svd(*A, (bool)full_matrices, (bool)compute_uv);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:870:29: error: no member named 'linalg_svd_out' in namespace 'torch'
cargo:warning= auto outputs
= torch::linalg_svd_out(*U, *S, *Vh, *A, (bool)full_matrices, (bool)compute_uv);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:886:84: error: reference to type 'const at::Tensor' could not bind to an rvalue of type 'at::ScalarType'
cargo:warning= auto outputs
= torch::log_softmax_backward_data(*grad_output, *output, dim, at::ScalarType(input_dtype));
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:3438:147: note: passing argument to parameter 'self' here
cargo:warning=TORCH_API inline at::Tensor log_softmax_backward_data(const at::Tensor & grad_output, const at::Tensor & output, int64_t dim, const at::Tensor & self) {
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:893:94: error: reference to type 'const at::Tensor' could not bind to an rvalue of type 'at::ScalarType'
cargo:warning= auto outputs
= torch::log_softmax_backward_data_out(*out, *grad_output, *output, dim, at::ScalarType(input_dtype));
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:3443:171: note: passing argument to parameter 'self' here
cargo:warning=TORCH_API inline at::Tensor & log_softmax_backward_data_out(at::Tensor & out, const at::Tensor & grad_output, const at::Tensor & output, int64_t dim, const at::Tensor & self) {
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:958:29: error: no member named 'masked_softmax' in namespace 'torch'
cargo:warning= auto outputs
= torch::masked_softmax(*self, *mask);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:986:29: error: no member named 'native_multi_head_self_attention' in namespace 'torch'
cargo:warning= auto outputs
= torch::native_multi_head_self_attention(*query, *qkv_weight, *qkv_bias, *proj_weight, *proj_bias, (mask ? *mask : torch::Tensor()));
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:1000:29: error: no member named 'new_zeros_with_same_feature_meta' in namespace 'torch'
cargo:warning= auto outputs
= torch::new_zeros_with_same_feature_meta(*self, *other, self_num_batch_dims);
cargo:warning= ~~~~~~~^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=In file included from libtch/torch_api.cpp:1426:
cargo:warning=libtch/torch_api_generated.cpp.h:1129:269: error: too few arguments to function call, expected 10, have 9
cargo:warning= auto outputs
= torch::_slow_conv2d_backward_out(*grad_input, *grad_weight, *grad_bias, *grad_output, *self, *weight, torch::IntArrayRef(kernel_size_data, kernel_size_len), torch::IntArrayRef(stride_data, stride_len), torch::IntArrayRef(padding_data, padding_len));
cargo:warning= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT'
cargo:warning= x
cargo:warning= ^
cargo:warning=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/ATen/Functions.h:11223:71: note: '_slow_conv2d_backward_out' declared here
cargo:warning=TORCH_API inline ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> _slow_conv2d_backward_out(at::Tensor & grad_input, at::Tensor & grad_weight, at::Tensor & grad_bias, const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & weight, at::IntArrayRef kernel_size, at::IntArrayRef stride, at::IntArrayRef padding, const at::Tensor & finput) {
cargo:warning= ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=20 errors generated.
exit status: 1

--- stderr

error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include" "-I" "/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/sunilmallya/workspace/rust-pt/tch-m1/torch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/sunilmallya/workspace/rust-pt/tch-m1/target/debug/build/torch-sys-e9927d9e03b8bf15/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp" with args "c++" did not execute successfully (status code exit status: 1).

@matthewgapp
Copy link

@sunilmallya are you still running into that error? I'm experiencing the same error.

@giorgostheo
Copy link

Hi, same issue for me as well. Tried all libtorch zips (both linux and mac) and nothing works.

I have a dockerfile for replicating this as well, so please let me know how can I help.

@anmolduainter
Copy link

Compilation is successful but when running getting below error:
dyld[88408]: symbol not found in flat namespace '__ZN3c1019UndefinedTensorImpl10_singletonE'

@LCrossman
Copy link

Siliicon M2 mac here, I have separate condas setup for arm64 and x86_64 as rosetta. But am getting the same linker errors trying to compile in either environment. Same errors with earlier torch-sys version. On the other hand pytorch is working great for python with mps support in arm64. Happy to test or help if possible. Posting arm64 errors first then x86_64 errors.
I have old intel mac where tch-rs is working great, but there is no cuda apple support on the machine. Also old Nvidia jetson nano, arm arch with cuda no tch-rs.

arm64 errors:
The following warnings were emitted during compilation:

warning: clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: libtch/torch_api.cpp:1:9: fatal error: 'torch/csrc/autograd/engine.h' file not found
warning: #include<torch/csrc/autograd/engine.h>
warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from libtch/torch_api_generated.cpp:2:
warning: In file included from libtch/torch_api_generated.h:2:
warning: libtch/torch_api.h:6:9: fatal error: 'torch/torch.h' file not found
warning: #include<torch/torch.h>
warning: ^~~~~~~~~~~~~~~
warning: 1 error generated.
warning: 1 error generated.

error: failed to run custom build command for torch-sys v0.13.0

Caused by:
process didn't exit successfully: /Users/lc/cr/tch-m1/target/debug/build/torch-sys-dc8a03ce39e7545e/build-script-build (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=LIBTORCH_USE_PYTORCH
cargo:rerun-if-env-changed=LIBTORCH
cargo:rerun-if-env-changed=LIBTORCH_INCLUDE
cargo:rerun-if-env-changed=LIBTORCH_LIB
cargo:rerun-if-env-changed=LIBTORCH_CXX11_ABI
cargo:rerun-if-env-changed=LIBTORCH_STATIC
cargo:rustc-link-search=native=/Users/lc/rust_projects/cr/libtorch/lib/lib
cargo:rerun-if-changed=libtch/fake_cuda_dependency.cpp
cargo:rerun-if-changed=libtch/torch_python.cpp
cargo:rerun-if-changed=libtch/torch_python.h
cargo:rerun-if-changed=libtch/torch_api_generated.cpp
cargo:rerun-if-changed=libtch/torch_api_generated.h
cargo:rerun-if-changed=libtch/torch_api.cpp
cargo:rerun-if-changed=libtch/torch_api.h
cargo:rerun-if-changed=libtch/stb_image_write.h
cargo:rerun-if-changed=libtch/stb_image_resize.h
cargo:rerun-if-changed=libtch/stb_image.h
cargo:libtorch_lib=/Users/lc/rust_projects/cr/libtorch/lib/lib
TARGET = Some("aarch64-apple-darwin")
OPT_LEVEL = Some("0")
HOST = Some("aarch64-apple-darwin")
cargo:rerun-if-env-changed=CXX_aarch64-apple-darwin
CXX_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CXX_aarch64_apple_darwin
CXX_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = None
cargo:rerun-if-env-changed=CXXFLAGS_aarch64-apple-darwin
CXXFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CXXFLAGS_aarch64_apple_darwin
CXXFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("aes,crc,dit,dotprod,dpb,dpb2,fcma,fhm,flagm,fp16,frintts,jsconv,lor,lse,neon,paca,pacg,pan,pmuv3,ras,rcpc,rcpc2,rdm,sb,sha2,sha3,ssbs,vh")
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-689ca3535ca01ed0/out/libtch/torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp"
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-689ca3535ca01ed0/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp"
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-689ca3535ca01ed0/out/libtch/fake_cuda_dependency.o" "-c" "libtch/fake_cuda_dependency.cpp"
cargo:warning=clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
cargo:warning=clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
cargo:warning=clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
exit status: 0
cargo:warning=libtch/torch_api.cpp:1:9: fatal error: 'torch/csrc/autograd/engine.h' file not found
cargo:warning=#include<torch/csrc/autograd/engine.h>
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
cargo:warning=In file included from libtch/torch_api_generated.h:2:
cargo:warning=libtch/torch_api.h:6:9: fatal error: 'torch/torch.h' file not found
cargo:warning=#include<torch/torch.h>
cargo:warning= ^~~~~~~~~~~~~~~
cargo:warning=1 error generated.
exit status: 1
cargo:warning=1 error generated.
exit status: 1

--- stderr

error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-689ca3535ca01ed0/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp" with args "c++" did not execute successfully (status code exit status: 1).


x86_64 errors:
The following warnings were emitted during compilation:

warning: clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: libtch/torch_api.cpp:1:9: fatal error: 'torch/csrc/autograd/engine.h' file not found
warning: #include<torch/csrc/autograd/engine.h>
warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from libtch/torch_api_generated.cpp:2:
warning: In file included from libtch/torch_api_generated.h:2:
warning: libtch/torch_api.h:6:9: fatal error: 'torch/torch.h' file not found
warning: #include<torch/torch.h>
warning: ^~~~~~~~~~~~~~~
warning: 1 error generated.
warning: 1 error generated.

error: failed to run custom build command for torch-sys v0.13.0

Caused by:
process didn't exit successfully: /Users/lc/cr/tch-m1/target/debug/build/torch-sys-6bf40bfbdfe25e81/build-script-build (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=LIBTORCH_USE_PYTORCH
cargo:rerun-if-env-changed=LIBTORCH
cargo:rerun-if-env-changed=LIBTORCH_INCLUDE
cargo:rerun-if-env-changed=LIBTORCH_LIB
cargo:rerun-if-env-changed=LIBTORCH_CXX11_ABI
cargo:rerun-if-env-changed=LIBTORCH_STATIC
cargo:rustc-link-search=native=/Users/lc/rust_projects/cr/libtorch/lib/lib
cargo:rerun-if-changed=libtch/fake_cuda_dependency.cpp
cargo:rerun-if-changed=libtch/torch_python.cpp
cargo:rerun-if-changed=libtch/torch_python.h
cargo:rerun-if-changed=libtch/torch_api_generated.cpp
cargo:rerun-if-changed=libtch/torch_api_generated.h
cargo:rerun-if-changed=libtch/torch_api.cpp
cargo:rerun-if-changed=libtch/torch_api.h
cargo:rerun-if-changed=libtch/stb_image_write.h
cargo:rerun-if-changed=libtch/stb_image_resize.h
cargo:rerun-if-changed=libtch/stb_image.h
cargo:libtorch_lib=/Users/lc/rust_projects/cr/libtorch/lib/lib
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-apple-darwin")
cargo:rerun-if-env-changed=CXX_x86_64-apple-darwin
CXX_x86_64-apple-darwin = None
cargo:rerun-if-env-changed=CXX_x86_64_apple_darwin
CXX_x86_64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-apple-darwin
CXXFLAGS_x86_64-apple-darwin = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_apple_darwin
CXXFLAGS_x86_64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3")
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-bffbc597d35ab5cb/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp"
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-bffbc597d35ab5cb/out/libtch/torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp"
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-bffbc597d35ab5cb/out/libtch/fake_cuda_dependency.o" "-c" "libtch/fake_cuda_dependency.cpp"
cargo:warning=clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
cargo:warning=clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
cargo:warning=clang: warning: -Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib: 'linker' input unused [-Wunused-command-line-argument]
cargo:warning=libtch/torch_api.cpp:1:9: fatal error: 'torch/csrc/autograd/engine.h' file not found
cargo:warning=#include<torch/csrc/autograd/engine.h>
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
cargo:warning=In file included from libtch/torch_api_generated.h:2:
cargo:warning=libtch/torch_api.h:6:9: fatal error: 'torch/torch.h' file not found
cargo:warning=#include<torch/torch.h>
cargo:warning= ^~~~~~~~~~~~~~~
exit status: 0
cargo:warning=1 error generated.
exit status: 1
cargo:warning=1 error generated.
exit status: 1

--- stderr

error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include" "-I" "/Users/lc/rust_projects/cr/torch-sys/include/include/torch/csrc/api/include" "-Wl,-rpath=/Users/lc/rust_projects/cr/libtorch/lib/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/lc/cr/tch-m1/target/debug/build/torch-sys-bffbc597d35ab5cb/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp" with args "c++" did not execute successfully (status code exit status: 1).

warning: build failed, waiting for other jobs to finish...

@LaurentMazare
Copy link
Owner

Not sure what your actual setup is but maybe you're setting the LIBTORCH_LIB environment variable with /Users/lc/rust_projects/cr/libtorch/lib and LIBTORCH_INCLUDE with /Users/lc/rust_projects/cr/libtorch/include. If that's the case you should instead try /Users/lc/rust_projects/cr/libtorch for both (or better remove these two environment variables and use only LIBTORCH instead).

@LCrossman
Copy link

That was true! It was looking in lib/lib
I got the path to work but then got all the macro protect errors from above in arm.
Hoping to get x86_64 to work, maybe in libtorch_nightly

@LCrossman
Copy link

LCrossman commented Jun 14, 2023

It built in x86_64 conda environment on silicon M2 mac!! - the Rust version had to be from the conda environment and there was a path problem initially linking back to arm rustc version. The LIBTORCH_INCLUDE now points to the include directory but the LIBTORCH_LIB points just to the LIBTORCH dir. The permissions were wrong on the downloaded libtorch. There were no permissions to x, only rw. So needed to change permissions or run in sudo.

@ShaojieJiang
Copy link

Totally new to Rust here, so please bear with me if my words don't make sense.

After trying for 1 hour, I finally got cargo run --example basics running on my M1 Macbook Pro. Posting my solution below in case it's helpful to anyone:

  1. Download the libtorch 2.0.0 build for M1 here, then decompress
  2. Set environment variables as follows:
export LIBTORCH=/path/to/libtorch
export LIBTORCH_LIB=/path/to/libtorch

both are necessary!

  1. Move the decompressed files under libtorch to one of Rust's rpath, such as /Users/xxx/. This is also necessary, although I haven't figured out what's the reason.
  2. Try running cargo run --example basics, and looking for OSX security warnings. Then go to Privacy & Security in System Settings, look for "Open anyway" and click it.
  3. Do step 4 several times until no warning window is popping up anymore, and finally you will get the example running.

My environment:
tch-rs latest commit: adf6dfa
OSX version: Ventura 13.4.1

@brandonros
Copy link

 $ export LIBTORCH="/opt/homebrew/Cellar/pytorch/2.0.1/"
MacBook-Air:tchtut brandon 2023-10-15 22:10:05 $ export DYLD_LIBRARY_PATH="/opt/homebrew/Cellar/pytorch/2.0.1/lib"
MacBook-Air:tchtut brandon 2023-10-15 22:10:05 $ cargo run --release --example blackpricing
   Compiling torch-sys v0.14.0 (https://github.com/LaurentMazare/tch-rs#dca12b64)
The following warnings were emitted during compilation:

warning: clang: warning: -Wl,-rpath=/opt/homebrew/Cellar/pytorch/2.0.1/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: clang: warning: -Wl,-rpath=/opt/homebrew/Cellar/pytorch/2.0.1/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: clang: warning: -Wl,-rpath=/opt/homebrew/Cellar/pytorch/2.0.1/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: libtch/torch_api_generated.cpp:633:29: error: no member named '_cslt_compress' in namespace 'torch'
warning:     auto outputs__ = torch::_cslt_compress(*input);
 $ brew ls pytorch
/opt/homebrew/Cellar/pytorch/2.0.1/bin/convert-caffe2-to-onnx
/opt/homebrew/Cellar/pytorch/2.0.1/bin/convert-onnx-to-caffe2
/opt/homebrew/Cellar/pytorch/2.0.1/bin/torch_shm_manager
/opt/homebrew/Cellar/pytorch/2.0.1/bin/torchrun
/opt/homebrew/Cellar/pytorch/2.0.1/include/ATen/ (7401 files)
/opt/homebrew/Cellar/pytorch/2.0.1/include/c10/ (167 files)
/opt/homebrew/Cellar/pytorch/2.0.1/include/caffe2/ (669 files)
/opt/homebrew/Cellar/pytorch/2.0.1/include/fp16/ (6 files)
/opt/homebrew/Cellar/pytorch/2.0.1/include/kineto/ (14 files)
/opt/homebrew/Cellar/pytorch/2.0.1/include/tensorpipe/ (22 files)
/opt/homebrew/Cellar/pytorch/2.0.1/include/torch/ (885 files)
/opt/homebrew/Cellar/pytorch/2.0.1/include/ (10 files)
/opt/homebrew/Cellar/pytorch/2.0.1/lib/libc10.dylib
/opt/homebrew/Cellar/pytorch/2.0.1/lib/libshm.dylib
/opt/homebrew/Cellar/pytorch/2.0.1/lib/libtorch.dylib
/opt/homebrew/Cellar/pytorch/2.0.1/lib/libtorch_cpu.dylib
/opt/homebrew/Cellar/pytorch/2.0.1/lib/libtorch_global_deps.dylib
/opt/homebrew/Cellar/pytorch/2.0.1/lib/libtorch_python.dylib
/opt/homebrew/Cellar/pytorch/2.0.1/lib/pkgconfig/ (2 files)
/opt/homebrew/Cellar/pytorch/2.0.1/lib/python3.11/ (2 files)
/opt/homebrew/Cellar/pytorch/2.0.1/lib/ (9 other files)
/opt/homebrew/Cellar/pytorch/2.0.1/libexec/bin/ (7 files)
/opt/homebrew/Cellar/pytorch/2.0.1/libexec/lib/ (3812 files)
/opt/homebrew/Cellar/pytorch/2.0.1/libexec/share/ (72 files)
/opt/homebrew/Cellar/pytorch/2.0.1/libexec/pyvenv.cfg
/opt/homebrew/Cellar/pytorch/2.0.1/share/ATen/Declarations.yaml
/opt/homebrew/Cellar/pytorch/2.0.1/share/cmake/ (31 files)
/opt/homebrew/Cellar/pytorch/2.0.1/share/cpuinfo/ (3 files)

https://formulae.brew.sh/formula/pytorch

I don't quite understand what about torch-sys v0.14.0 (https://github.com/LaurentMazare/tch-rs#dca12b64) is incompatible with what is provided from brew install pytorch

@danieldk
Copy link
Contributor

The current version of tch requires Torch 2.1.0 and you have installed 2.0.1. So you either need to downgrade the tch crate or upgrade PyTorch to 2.1.0.

@Peefy
Copy link

Peefy commented Nov 24, 2023

Share the successful process of compiling and running my m1/m2:

  1. python3 -m pip install torch==2.1.0
  2. export LIBTORCH_USE_PYTORCH=1
  3. sudo cp <your_python_site_package_path>/torch/lib/lib** /usr/local/lib
  4. cargo run

@jtomek
Copy link

jtomek commented Dec 6, 2023

Share the successful process of compiling and running my m1/m2:

  1. python3 -m pip install torch==2.1.0
  2. export LIBTORCH_USE_PYTORCH=1
  3. sudo cp <your_python_site_package_path>/torch/lib/lib** /usr/local/lib
  4. cargo run

Your comment and solution does not get enough love! Thank you!

@AndyJado
Copy link

AndyJado commented Dec 23, 2023

echo $LIBTORCH_USE_PYTORCH returns 1.
but it doesn't affect anything.
still I got dyld[33500]: Library not loaded: @rpath/libtorch_cpu.dylib

@JQuezada0
Copy link

JQuezada0 commented Jan 6, 2024

Not sure if anyone else is still having issues or if this was already solved elsewhere, but I managed to get a working build on Apple M1 Pro 16GB 14.1.1 using libtorch built from source.

TLDR;

This how to use libtorch nightly, built from source on M1 Pro with MPS. Resulting tch changes

Here's the rough outline of the steps:

Build libtorch

Follow these steps to build libtorch from source

What I ran:

git clone -b main --recurse-submodule https://github.com/pytorch/pytorch.git
mkdir pytorch-build
cd pytorch-build
export USE_MPS=1
export USE_PYTORCH_METAL=1
cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DPYTHON_EXECUTABLE:PATH=`which python3` -DCMAKE_INSTALL_PREFIX:PATH=../pytorch-install ../pytorch
cmake --build . --target install

That'll take a while, not sure how long though because it got to ~90% and then slowed way down so I went to bed

Build tch-rs

I'd started with a fresh crate using cargo init. Clone the repo git clone https://github.com/LaurentMazare/tch-rs.git into a directory adjacent to the empty crate, and then define a dependency on the local tch.

My cargo.toml ended up as

[package]
name = "foobar"
version = "0.1.0"
edition = "2021"

[dependencies]
tch = "0.14.0"
ndarray = { version = "0.15.6", features = [
  "rayon",
  "blas",
  "matrixmultiply-threading",
] }
safetensors = "0.4.1"
rust-bert = { path = "../rust-bert" }

[patch.crates-io]
ahash = { path = "../aHash" }
tch = { path = "../tch-rs" }

(I would suggest not including rust-bert, it caused another issue for me that required pulling ahash to enable #![feature(stdsimd)])

Update (and create if it doesn't exist) the .cargo/config.toml in both the crate and in tch-rs to include LIBTORCH and DYLD_LIBRARY_PATH pointing to the directory where libtorch was built to, and the lib directory respectively. In my case that was:

[env]
LIBTORCH = "/Users/☯/Development/pytorch-install"
DYLD_LIBRARY_PATH = "/Users/☯/Development/pytorch-install/lib:$DYLD_LIBRARY_PATH"

At this point running cargo build should fail. The first error I ran into is one mentioned in this thread

 libtch/torch_api.h:6:9: fatal error: 'torch/torch.h' file not found

This was caused by setting LIBTORCH to a relative path. Make sure it's an absolute path.

The other was the longer one in this thread that prints this note out a bunch of times

note: expanded from macro 'PROTECT'

Following @danieldk's suggestion here, the goal is to regenerate the files where the errors are coming from.

Install OCaml and deps

  • Install requirements for running regen code
brew install opam
brew install dune
  • When installing opam, make sure to follow the instructions that pop up, it should say to run opam init.
    Install more requirements
opam install yaml
opam install stdio

Get the declarations file

You'll want to get a yml file that should've been generated when libtorch was built. It should be wherever you chose to build libtorch in share/ATen/Declarations.yml (/Users/☯/Development/pytorch-install/share/ATen/Declarations.yaml)

Copy that file to the local tch-rs inside of third_party/pytorch. I named it Declarations-v2.3.0.yaml based on this. So the result should be third_party/pytorch/Declarations-v2.3.0.yaml

Run the regen script

Update the path here so that it points to the nightly version 2.3.0.

Then run:

dune exec gen/gen.exe --profile release

Rebuild

Finally, you should be able to go back to the empty crate and run

cargo clean
cargo build

I put all the resulting changes (except for .cargo/config) in this PR. The description includes a snippet to test with.

@kj3moraes
Copy link

kj3moraes commented Mar 12, 2024

I still get a build error for a Tauri app that I am running, the log is as follows

warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: torch-sys@0.13.0: xcrun: error: unable to lookup item 'PlatformVersion' from command line tools installation
warning: torch-sys@0.13.0: xcrun: error: unable to lookup item 'PlatformVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
warning: torch-sys@0.13.0: xcrun: error: unable to lookup item 'PlatformVersion' from command line tools installation
warning: torch-sys@0.13.0: xcrun: error: unable to lookup item 'PlatformVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
warning: torch-sys@0.13.0: xcrun: error: unable to lookup item 'PlatformVersion' from command line tools installation
warning: torch-sys@0.13.0: xcrun: error: unable to lookup item 'PlatformVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
warning: torch-sys@0.13.0: clang: warning: -Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: torch-sys@0.13.0: clang: warning: -Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:4:2: error: C++17 or later compatible compiler is required to use PyTorch.
warning: torch-sys@0.13.0: #error C++17 or later compatible compiler is required to use PyTorch.
warning: torch-sys@0.13.0:  ^
warning: torch-sys@0.13.0: clang: warning: -Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument]
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:11:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Device.h:5:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:118:34: error: no template named 'variant' in namespace 'std'
warning: torch-sys@0.13.0:   using warning_variant_t = std::variant<UserWarning, DeprecationWarning>;
warning: torch-sys@0.13.0:                             ~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:121:7: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:       warning_variant_t type,
warning: torch-sys@0.13.0:       ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:127:7: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:       warning_variant_t type,
warning: torch-sys@0.13.0:       ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:133:7: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:       warning_variant_t type,
warning: torch-sys@0.13.0:       ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:139:3: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:   warning_variant_t type() const;
warning: torch-sys@0.13.0:   ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:146:3: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:   warning_variant_t type_;
warning: torch-sys@0.13.0:   ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:3:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/C++17.h:27:2: error: You need C++17 to compile PyTorch
warning: torch-sys@0.13.0: #error You need C++17 to compile PyTorch
warning: torch-sys@0.13.0:  ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:342:77: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
warning: torch-sys@0.13.0: static_assert(std::is_same<int, last_t<typelist<double, float, int>>>::value);
warning: torch-sys@0.13.0:                                                                             ^
warning: torch-sys@0.13.0:                                                                             , ""
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:12: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
warning: torch-sys@0.13.0:       std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:            is_nothrow_move_constructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
warning: torch-sys@0.13.0: template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
warning: torch-sys@0.13.0:                                                  ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:46: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:       std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:16: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
warning: torch-sys@0.13.0:           std::is_nothrow_destructible_v<T>);
warning: torch-sys@0.13.0:           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:                is_nothrow_destructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:44: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:           std::is_nothrow_destructible_v<T>);
warning: torch-sys@0.13.0:           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:45: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
warning: torch-sys@0.13.0:     SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:                                        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:                                             is_nothrow_move_constructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
warning: torch-sys@0.13.0: template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
warning: torch-sys@0.13.0:                                                  ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:79: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:     SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:49: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
warning: torch-sys@0.13.0:                                            std::is_nothrow_destructible_v<T>) {
warning: torch-sys@0.13.0:                                            ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:                                                 is_nothrow_destructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:77: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:                                            std::is_nothrow_destructible_v<T>) {
warning: torch-sys@0.13.0:                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
warning: torch-sys@0.13.0:       std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
warning: torch-sys@0.13.0:       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:            is_nothrow_move_assignable
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:60: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:       std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
warning: torch-sys@0.13.0:       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1375:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
warning: torch-sys@0.13.0:       std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
warning: torch-sys@0.13.0:       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:            is_nothrow_move_assignable
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api.cpp:1:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1375:60: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:       std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
warning: torch-sys@0.13.0:       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:11:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Device.h:5:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:118:34: error: no template named 'variant' in namespace 'std'
warning: torch-sys@0.13.0:   using warning_variant_t = std::variant<UserWarning, DeprecationWarning>;
warning: torch-sys@0.13.0:                             ~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:121:7: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:       warning_variant_t type,
warning: torch-sys@0.13.0:       ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:127:7: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:       warning_variant_t type,
warning: torch-sys@0.13.0:       ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:133:7: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:       warning_variant_t type,
warning: torch-sys@0.13.0:       ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:139:3: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:   warning_variant_t type() const;
warning: torch-sys@0.13.0:   ^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:146:3: error: unknown type name 'warning_variant_t'
warning: torch-sys@0.13.0:   warning_variant_t type_;
warning: torch-sys@0.13.0:   ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:3:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/C++17.h:27:2: error: You need C++17 to compile PyTorch
warning: torch-sys@0.13.0: #error You need C++17 to compile PyTorch
warning: torch-sys@0.13.0:  ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:342:77: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
warning: torch-sys@0.13.0: static_assert(std::is_same<int, last_t<typelist<double, float, int>>>::value);
warning: torch-sys@0.13.0:                                                                             ^
warning: torch-sys@0.13.0:                                                                             , ""
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:12: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
warning: torch-sys@0.13.0:       std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:            is_nothrow_move_constructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
warning: torch-sys@0.13.0: template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
warning: torch-sys@0.13.0:                                                  ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:46: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:       std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:16: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
warning: torch-sys@0.13.0:           std::is_nothrow_destructible_v<T>);
warning: torch-sys@0.13.0:           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:                is_nothrow_destructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:44: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:           std::is_nothrow_destructible_v<T>);
warning: torch-sys@0.13.0:           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:45: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
warning: torch-sys@0.13.0:     SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:                                        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:                                             is_nothrow_move_constructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
warning: torch-sys@0.13.0: template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
warning: torch-sys@0.13.0:                                                  ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:79: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:     SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
warning: torch-sys@0.13.0:                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:49: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
warning: torch-sys@0.13.0:                                            std::is_nothrow_destructible_v<T>) {
warning: torch-sys@0.13.0:                                            ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:                                                 is_nothrow_destructible
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:77: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:                                            std::is_nothrow_destructible_v<T>) {
warning: torch-sys@0.13.0:                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
warning: torch-sys@0.13.0:       std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
warning: torch-sys@0.13.0:       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:            is_nothrow_move_assignable
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api_generated.h:2:
warning: torch-sys@0.13.0: In file included from libtch/torch_api.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
warning: torch-sys@0.13.0: In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:60: error: expected '(' for function-style cast or type construction
warning: torch-sys@0.13.0:       std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
warning: torch-sys@0.13.0:       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
warning: torch-sys@0.13.0: /Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1375:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
warning: torch-sys@0.13.0:       std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
warning: torch-sys@0.13.0:       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.13.0:            is_nothrow_move_assignable
warning: torch-sys@0.13.0: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
warning: torch-sys@0.13.0: struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
warning: torch-sys@0.13.0:                             ^
warning: torch-sys@0.13.0: fatal error: too many errors emitted, stopping now [-ferror-limit=]
warning: torch-sys@0.13.0: fatal error: too many errors emitted, stopping now [-ferror-limit=]
warning: torch-sys@0.13.0: 1 warning and 20 errors generated.
warning: torch-sys@0.13.0: ToolExecError: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "--target=arm64-apple-darwin" "-mmacosx-version-min=11.0" "-I" "/Users/kj3moraes/Repos/libtorch/include" "-I" "/Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/kj3moraes/Projects/Coding/fable-fs/monocle/src-tauri/target/debug/build/torch-sys-38869f0b8dbec3d3/out/19072f24a82f85ae-torch_api.o" "-c" "libtch/torch_api.cpp" with args "c++" did not execute successfully (status code exit status: 1).cargo:warning=1 warning and 20 errors generated.
warning: torch-sys@0.13.0: ToolExecError: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "--target=arm64-apple-darwin" "-mmacosx-version-min=11.0" "-I" "/Users/kj3moraes/Repos/libtorch/include" "-I" "/Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/kj3moraes/Projects/Coding/fable-fs/monocle/src-tauri/target/debug/build/torch-sys-38869f0b8dbec3d3/out/19072f24a82f85ae-torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp" with args "c++" did not execute successfully (status code exit status: 1).

error: failed to run custom build command for `torch-sys v0.13.0`

Caused by:
  process didn't exit successfully: `/Users/kj3moraes/Projects/Coding/fable-fs/monocle/src-tauri/target/debug/build/torch-sys-a22127057681c91e/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=LIBTORCH_USE_PYTORCH
  cargo:rerun-if-env-changed=LIBTORCH
  cargo:rerun-if-env-changed=LIBTORCH_INCLUDE
  cargo:rerun-if-env-changed=LIBTORCH_LIB
  cargo:rerun-if-env-changed=LIBTORCH_CXX11_ABI
  cargo:rerun-if-env-changed=LIBTORCH_STATIC
  cargo:rustc-link-search=native=/Users/kj3moraes/Repos/libtorch/lib
  cargo:rerun-if-changed=libtch/fake_cuda_dependency.cpp
  cargo:rerun-if-changed=libtch/torch_python.cpp
  cargo:rerun-if-changed=libtch/torch_python.h
  cargo:rerun-if-changed=libtch/torch_api_generated.cpp
  cargo:rerun-if-changed=libtch/torch_api_generated.h
  cargo:rerun-if-changed=libtch/torch_api.cpp
  cargo:rerun-if-changed=libtch/torch_api.h
  cargo:rerun-if-changed=libtch/stb_image_write.h
  cargo:rerun-if-changed=libtch/stb_image_resize.h
  cargo:rerun-if-changed=libtch/stb_image.h
  cargo:libtorch_lib=/Users/kj3moraes/Repos/libtorch/lib
  TARGET = Some("aarch64-apple-darwin")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CXX_aarch64-apple-darwin
  CXX_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CXX_aarch64_apple_darwin
  CXX_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  cargo:warning=xcrun: error: unable to lookup item 'PlatformVersion' from command line tools installation
  cargo:warning=xcrun: error: unable to lookup item 'PlatformVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
  cargo:rerun-if-env-changed=CXXFLAGS_aarch64-apple-darwin
  CXXFLAGS_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CXXFLAGS_aarch64_apple_darwin
  CXXFLAGS_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:warning=xcrun: error: unable to lookup item 'PlatformVersion' from command line tools installation
  cargo:warning=xcrun: error: unable to lookup item 'PlatformVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
  cargo:warning=xcrun: error: unable to lookup item 'PlatformVersion' from command line tools installation
  cargo:warning=xcrun: error: unable to lookup item 'PlatformVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
  cargo:warning=clang: warning: -Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument]
  cargo:warning=clang: warning: -Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument]
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:4:2: error: C++17 or later compatible compiler is required to use PyTorch.
  cargo:warning=#error C++17 or later compatible compiler is required to use PyTorch.
  cargo:warning= ^
  cargo:warning=clang: warning: -Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument]
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:11:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Device.h:5:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:118:34: error: no template named 'variant' in namespace 'std'
  cargo:warning=  using warning_variant_t = std::variant<UserWarning, DeprecationWarning>;
  cargo:warning=                            ~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:121:7: error: unknown type name 'warning_variant_t'
  cargo:warning=      warning_variant_t type,
  cargo:warning=      ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:127:7: error: unknown type name 'warning_variant_t'
  cargo:warning=      warning_variant_t type,
  cargo:warning=      ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:133:7: error: unknown type name 'warning_variant_t'
  cargo:warning=      warning_variant_t type,
  cargo:warning=      ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:139:3: error: unknown type name 'warning_variant_t'
  cargo:warning=  warning_variant_t type() const;
  cargo:warning=  ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:146:3: error: unknown type name 'warning_variant_t'
  cargo:warning=  warning_variant_t type_;
  cargo:warning=  ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:3:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/C++17.h:27:2: error: You need C++17 to compile PyTorch
  cargo:warning=#error You need C++17 to compile PyTorch
  cargo:warning= ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:342:77: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
  cargo:warning=static_assert(std::is_same<int, last_t<typelist<double, float, int>>>::value);
  cargo:warning=                                                                            ^
  cargo:warning=                                                                            , ""
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:12: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
  cargo:warning=      std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=           is_nothrow_move_constructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
  cargo:warning=template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
  cargo:warning=                                                 ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:46: error: expected '(' for function-style cast or type construction
  cargo:warning=      std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:16: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
  cargo:warning=          std::is_nothrow_destructible_v<T>);
  cargo:warning=          ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=               is_nothrow_destructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
  cargo:warning=                            ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:44: error: expected '(' for function-style cast or type construction
  cargo:warning=          std::is_nothrow_destructible_v<T>);
  cargo:warning=          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:45: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
  cargo:warning=    SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=                                       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=                                            is_nothrow_move_constructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
  cargo:warning=template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
  cargo:warning=                                                 ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:79: error: expected '(' for function-style cast or type construction
  cargo:warning=    SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:49: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
  cargo:warning=                                           std::is_nothrow_destructible_v<T>) {
  cargo:warning=                                           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=                                                is_nothrow_destructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
  cargo:warning=                            ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:77: error: expected '(' for function-style cast or type construction
  cargo:warning=                                           std::is_nothrow_destructible_v<T>) {
  cargo:warning=                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
  cargo:warning=      std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
  cargo:warning=      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=           is_nothrow_move_assignable
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
  cargo:warning=                            ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:60: error: expected '(' for function-style cast or type construction
  cargo:warning=      std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
  cargo:warning=      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1375:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
  cargo:warning=      std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
  cargo:warning=      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=           is_nothrow_move_assignable
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
  cargo:warning=                            ^
  cargo:warning=In file included from libtch/torch_api.cpp:1:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/engine.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1375:60: error: expected '(' for function-style cast or type construction
  cargo:warning=      std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
  cargo:warning=      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:11:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Device.h:5:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:118:34: error: no template named 'variant' in namespace 'std'
  cargo:warning=  using warning_variant_t = std::variant<UserWarning, DeprecationWarning>;
  cargo:warning=                            ~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:121:7: error: unknown type name 'warning_variant_t'
  cargo:warning=      warning_variant_t type,
  cargo:warning=      ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:127:7: error: unknown type name 'warning_variant_t'
  cargo:warning=      warning_variant_t type,
  cargo:warning=      ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:133:7: error: unknown type name 'warning_variant_t'
  cargo:warning=      warning_variant_t type,
  cargo:warning=      ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:139:3: error: unknown type name 'warning_variant_t'
  cargo:warning=  warning_variant_t type() const;
  cargo:warning=  ^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/Exception.h:146:3: error: unknown type name 'warning_variant_t'
  cargo:warning=  warning_variant_t type_;
  cargo:warning=  ^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:3:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/C++17.h:27:2: error: You need C++17 to compile PyTorch
  cargo:warning=#error You need C++17 to compile PyTorch
  cargo:warning= ^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:12:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Layout.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/Backend.h:5:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/DispatchKeySet.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/Metaprogramming.h:3:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/TypeList.h:342:77: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
  cargo:warning=static_assert(std::is_same<int, last_t<typelist<double, float, int>>>::value);
  cargo:warning=                                                                            ^
  cargo:warning=                                                                            , ""
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:12: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
  cargo:warning=      std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=           is_nothrow_move_constructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
  cargo:warning=template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
  cargo:warning=                                                 ^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1026:46: error: expected '(' for function-style cast or type construction
  cargo:warning=      std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:16: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
  cargo:warning=          std::is_nothrow_destructible_v<T>);
  cargo:warning=          ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=               is_nothrow_destructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
  cargo:warning=                            ^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1027:44: error: expected '(' for function-style cast or type construction
  cargo:warning=          std::is_nothrow_destructible_v<T>);
  cargo:warning=          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:45: error: no template named 'is_nothrow_move_constructible_v' in namespace 'std'; did you mean 'is_nothrow_move_constructible'?
  cargo:warning=    SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=                                       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=                                            is_nothrow_move_constructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_constructible.h:26:50: note: 'is_nothrow_move_constructible' declared here
  cargo:warning=template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
  cargo:warning=                                                 ^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1133:79: error: expected '(' for function-style cast or type construction
  cargo:warning=    SmallVectorImpl<T>&& RHS) noexcept(std::is_nothrow_move_constructible_v<T>&&
  cargo:warning=                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:49: error: no template named 'is_nothrow_destructible_v' in namespace 'std'; did you mean 'is_nothrow_destructible'?
  cargo:warning=                                           std::is_nothrow_destructible_v<T>) {
  cargo:warning=                                           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=                                                is_nothrow_destructible
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_destructible.h:44:29: note: 'is_nothrow_destructible' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
  cargo:warning=                            ^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1134:77: error: expected '(' for function-style cast or type construction
  cargo:warning=                                           std::is_nothrow_destructible_v<T>) {
  cargo:warning=                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
  cargo:warning=      std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
  cargo:warning=      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=           is_nothrow_move_assignable
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
  cargo:warning=                            ^
  cargo:warning=In file included from libtch/torch_api_generated.cpp:2:
  cargo:warning=In file included from libtch/torch_api_generated.h:2:
  cargo:warning=In file included from libtch/torch_api.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/torch.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/all.h:7:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/autograd.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/variable.h:6:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/cpp_hook.h:2:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/torch/csrc/autograd/function_hook.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/Tensor.h:3:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/ATen/core/TensorBody.h:13:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/core/MemoryFormat.h:4:
  cargo:warning=In file included from /Users/kj3moraes/Repos/libtorch/include/c10/util/ArrayRef.h:20:
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1347:60: error: expected '(' for function-style cast or type construction
  cargo:warning=      std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
  cargo:warning=      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  cargo:warning=/Users/kj3moraes/Repos/libtorch/include/c10/util/SmallVector.h:1375:12: error: no template named 'is_nothrow_move_assignable_v' in namespace 'std'; did you mean 'is_nothrow_move_assignable'?
  cargo:warning=      std::is_nothrow_move_assignable_v<SmallVectorImpl<T>>)
  cargo:warning=      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=           is_nothrow_move_assignable
  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_nothrow_move_assignable.h:24:29: note: 'is_nothrow_move_assignable' declared here
  cargo:warning=struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
  cargo:warning=                            ^
  cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
  cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
  cargo:warning=1 warning and 20 errors generated.
  exit status: 0
  exit status: 1
  cargo:warning=ToolExecError: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "--target=arm64-apple-darwin" "-mmacosx-version-min=11.0" "-I" "/Users/kj3moraes/Repos/libtorch/include" "-I" "/Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/kj3moraes/Projects/Coding/fable-fs/monocle/src-tauri/target/debug/build/torch-sys-38869f0b8dbec3d3/out/19072f24a82f85ae-torch_api.o" "-c" "libtch/torch_api.cpp" with args "c++" did not execute successfully (status code exit status: 1).cargo:warning=1 warning and 20 errors generated.

  exit status: 1
  cargo:warning=ToolExecError: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "--target=arm64-apple-darwin" "-mmacosx-version-min=11.0" "-I" "/Users/kj3moraes/Repos/libtorch/include" "-I" "/Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/kj3moraes/Projects/Coding/fable-fs/monocle/src-tauri/target/debug/build/torch-sys-38869f0b8dbec3d3/out/19072f24a82f85ae-torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp" with args "c++" did not execute successfully (status code exit status: 1).

  --- stderr


  error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "--target=arm64-apple-darwin" "-mmacosx-version-min=11.0" "-I" "/Users/kj3moraes/Repos/libtorch/include" "-I" "/Users/kj3moraes/Repos/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/kj3moraes/Repos/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/kj3moraes/Projects/Coding/fable-fs/monocle/src-tauri/target/debug/build/torch-sys-38869f0b8dbec3d3/out/19072f24a82f85ae-torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp" with args "c++" did not execute successfully (status code exit status: 1).

Currently I have libtorch v2.2.1 unzipped in a local directory and I have LIBTORCH pointing to it. I have tried @ShaojieJiang's approach as to no avail. I get this same error when I try to follow rust-bert's installation mechanism

The error at the start suggested that I didn't have C++17 on my machine but I do. I can compile a simple C++ program if I set the --std= flag. Any ideas why this is failing ?

@LaurentMazare
Copy link
Owner

According to your logs, you're using tch-rs 0.13.0, this version is I think for libtorch 2.0.0. Version 0.15.0 should be used for libtorch 2.2.0 (and might work with 2.2.1).

@kj3moraes
Copy link

This resolved it thanks. 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests