guillaume-be / rust-bert

Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)
https://docs.rs/crate/rust-bert
Apache License 2.0
2.65k stars 215 forks source link

Failed to run cargo build #127

Closed failable closed 3 years ago

failable commented 3 years ago

Hi, I'd like to build rust-bert on my Mac but failed. However, I successfully run cargo build in the tsh-rs repo.

Below is the error output, do you have any suggestion? Thanks!

Last login: Fri Mar 5 12:34:44 on ttys001 direnv: export +NPM_CONFIG_PREFIX +VIRTUAL_ENV ~PATH user@macOS: ~ (python-3.8.7) $ z bert user@macOS: ~/git/rust/rust-bert (python-3.8.7) $ cargo build Compiling torch-sys v0.3.1 Compiling rust_tokenizers v6.2.1 Compiling cached-path v0.5.0 The following warnings were emitted during compilation: warning: clang: warning: -Wl,-rpath=/Users/user/.local/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument] warning: libtch/torch_api.cpp:142:9: error: no member named '_amp_non_finite_check_and_unscale_' in namespace 'at'; did you mean '_amp_foreach_non_finite_check_and_unscale_'? warning: at::_amp_non_finite_check_and_unscale_(*t, *found_inf, *inf_scale); warning: ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: _amp_foreach_non_finite_check_and_unscale_ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:1645:16: note: '_amp_foreach_non_finite_check_and_unscale_' declared here warning: TORCH_API void _amp_foreach_non_finite_check_and_unscale_(TensorList self, Tensor & found_inf, const Tensor & inv_scale); warning: ^ warning: libtch/torch_api.cpp:487:109: error: no viable conversion from 'vector' to 'bool' warning: auto vl = torch::autograd::Engine::get_default_engine().execute(roots, grads, keep_graph, create_graph, inputs_); warning: ^~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/torch/csrc/autograd/engine.h:275:12: note: passing argument to parameter 'accumulate_grad' here warning: bool accumulate_grad, warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:415:386: error: too few arguments to function call, expected 16, have 15 warning: auto outputs__ = torch::_cudnn_rnn(*input, of_carray_tensor(weight_data, weight_len), weight_stride0, (weight_buf ? *weight_buf : torch::Tensor()), *hx, (cx ? *cx : torch::Tensor()), mode, hidden_size, num_layers, (bool)batch_first, dropout, (bool)train, (bool)bidirectional, torch::IntArrayRef(batch_sizes_data, batch_sizes_len), (dropout_state ? *dropout_state : torch::Tensor())); warning: ~~~~~~~~~~~~~~~~~ ^ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:59:58: note: '_cudnn_rnn' declared here warning: TORCH_API std::tuple _cudnn_rnn(const Tensor & input, TensorList weight, int64_t weight_stride0, const c10::optional & weight_buf, const Tensor & hx, const c10::optional & cx, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, double dropout, bool train, bool bidirectional, IntArrayRef batch_sizes, const c10::optional & dropout_state); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:426:203: error: too few arguments to function call, expected 9, have 8 warning: auto outputs__ = torch::_cudnn_rnn_flatten_weight(of_carray_tensor(weight_arr_data, weight_arr_len), weight_stride0, input_size, mode, hidden_size, num_layers, (bool)batch_first, (bool)bidirectional); warning: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:58:18: note: '_cudnn_rnn_flatten_weight' declared here warning: TORCH_API Tensor _cudnn_rnn_flatten_weight(TensorList weight_arr, int64_t weight_stride0, int64_t input_size, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, bool bidirectional); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:576:29: error: no member named '_fft_with_size' in namespace 'torch' warning: auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), (bool)normalized, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: warning: libtch/torch_api_generated.cpp.h:583:29: error: no member named '_fft_with_size' in namespace 'torch' warning: auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), normalization, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: warning: libtch/torch_api_generated.cpp.h:627:53: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::_index_put_impl_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate, (bool)unsafe); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:562:93: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor & _index_put_impl_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false, bool unsafe=false); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:750:29: error: no member named '_multinomial_alias_draw' in namespace 'torch' warning: auto outputs__ = torch::_multinomial_alias_draw(*J, *q, num_samples); 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:1215: warning: libtch/torch_api_generated.cpp.h:757:29: error: no member named '_multinomial_alias_setup' in namespace 'torch' warning: auto outputs__ = torch::_multinomial_alias_setup(*probs); 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:1215: warning: libtch/torch_api_generated.cpp.h:816:29: error: no member named '_qr_helper' in namespace 'torch' warning: auto outputs__ = torch::_qr_helper(*self, (bool)some); 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:1215: warning: libtch/torch_api_generated.cpp.h:3487:93: error: too few arguments to function call, expected 6, have 5 warning: auto outputs__ = torch::elu_backward(*grad_output, *alpha, *scale, *input_scale, *output); warning: ~~~~~~~~~~~~~~~~~~~ ^ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:1812:18: note: 'elu_backward' declared here warning: TORCH_API Tensor elu_backward(const Tensor & grad_output, Scalar alpha, Scalar scale, Scalar input_scale, bool is_result, const Tensor & self_or_result); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:3494:29: error: no member named 'elu_backward_out' in namespace 'torch' warning: auto outputs__ = torch::elu_backward_out(*grad_input, *grad_output, *alpha, *scale, *input_scale, *output); 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:1215: warning: libtch/torch_api_generated.cpp.h:3819:29: error: no member named 'fake_quantize_per_channel_affine_backward' in namespace 'torch' warning: auto outputs__ = torch::fake_quantize_per_channel_affine_backward(*grad, *self, *scale, *zero_point, axis, quant_min, quant_max); 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:1215: warning: libtch/torch_api_generated.cpp.h:3833:29: error: no member named 'fake_quantize_per_tensor_affine_backward' in namespace 'torch' warning: auto outputs__ = torch::fake_quantize_per_tensor_affine_backward(*grad, *self, scale, zero_point, quant_min, quant_max); 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:1215: warning: libtch/torch_api_generated.cpp.h:3917:29: error: unexpected namespace name 'fft': expected expression warning: auto outputs__ = torch::fft(*self, signal_ndim, (bool)normalized); warning: ^ warning: libtch/torch_api_generated.cpp.h:4914:29: error: no member named 'ifft' in namespace 'torch' warning: auto outputs__ = torch::ifft(*self, signal_ndim, (bool)normalized); 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:1215: warning: libtch/torch_api_generated.cpp.h:4956:42: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::index(*self, of_carray_tensor(indices_data, indices_len)); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:557:86: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor index(const Tensor & self, const c10::List> & indices); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:5019:46: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::index_put(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:561:90: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor index_put(const Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:5026:47: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::index_put_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:560:87: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor & index_put_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); 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.3.1` Caused by: process didn't exit successfully: `/Users/user/git/rust/rust-bert/target/debug/build/torch-sys-b5698cc78204d67c/build-script-build` (exit code: 1) --- stdout cargo:rerun-if-env-changed=TORCH_CUDA_VERSION cargo:rerun-if-env-changed=LIBTORCH cargo:rustc-link-search=native=/Users/user/.local/libtorch/lib cargo:rerun-if-env-changed=LIBTORCH_USE_CMAKE 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("x86_64-apple-darwin") OPT_LEVEL = Some("0") HOST = Some("x86_64-apple-darwin") CXX_x86_64-apple-darwin = None CXX_x86_64_apple_darwin = None HOST_CXX = None CXX = None CXXFLAGS_x86_64-apple-darwin = None CXXFLAGS_x86_64_apple_darwin = None HOST_CXXFLAGS = None CXXFLAGS = None 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" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/user/.local/libtorch/include" "-I" "/Users/user/.local/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/user/.local/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/user/git/rust/rust-bert/target/debug/build/torch-sys-c9a36c0d279de21f/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp" cargo:warning=clang: warning: -Wl,-rpath=/Users/user/.local/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument] cargo:warning=libtch/torch_api.cpp:142:9: error: no member named '_amp_non_finite_check_and_unscale_' in namespace 'at'; did you mean '_amp_foreach_non_finite_check_and_unscale_'? cargo:warning= at::_amp_non_finite_check_and_unscale_(*t, *found_inf, *inf_scale); cargo:warning= ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning= _amp_foreach_non_finite_check_and_unscale_ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:1645:16: note: '_amp_foreach_non_finite_check_and_unscale_' declared here cargo:warning=TORCH_API void _amp_foreach_non_finite_check_and_unscale_(TensorList self, Tensor & found_inf, const Tensor & inv_scale); cargo:warning= ^ cargo:warning=libtch/torch_api.cpp:487:109: error: no viable conversion from 'vector' to 'bool' cargo:warning= auto vl = torch::autograd::Engine::get_default_engine().execute(roots, grads, keep_graph, create_graph, inputs_); cargo:warning= ^~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/torch/csrc/autograd/engine.h:275:12: note: passing argument to parameter 'accumulate_grad' here cargo:warning= bool accumulate_grad, cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:415:386: error: too few arguments to function call, expected 16, have 15 cargo:warning= auto outputs__ = torch::_cudnn_rnn(*input, of_carray_tensor(weight_data, weight_len), weight_stride0, (weight_buf ? *weight_buf : torch::Tensor()), *hx, (cx ? *cx : torch::Tensor()), mode, hidden_size, num_layers, (bool)batch_first, dropout, (bool)train, (bool)bidirectional, torch::IntArrayRef(batch_sizes_data, batch_sizes_len), (dropout_state ? *dropout_state : torch::Tensor())); cargo:warning= ~~~~~~~~~~~~~~~~~ ^ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:59:58: note: '_cudnn_rnn' declared here cargo:warning=TORCH_API std::tuple _cudnn_rnn(const Tensor & input, TensorList weight, int64_t weight_stride0, const c10::optional & weight_buf, const Tensor & hx, const c10::optional & cx, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, double dropout, bool train, bool bidirectional, IntArrayRef batch_sizes, const c10::optional & dropout_state); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:426:203: error: too few arguments to function call, expected 9, have 8 cargo:warning= auto outputs__ = torch::_cudnn_rnn_flatten_weight(of_carray_tensor(weight_arr_data, weight_arr_len), weight_stride0, input_size, mode, hidden_size, num_layers, (bool)batch_first, (bool)bidirectional); cargo:warning= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:58:18: note: '_cudnn_rnn_flatten_weight' declared here cargo:warning=TORCH_API Tensor _cudnn_rnn_flatten_weight(TensorList weight_arr, int64_t weight_stride0, int64_t input_size, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, bool bidirectional); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:576:29: error: no member named '_fft_with_size' in namespace 'torch' cargo:warning= auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), (bool)normalized, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:583:29: error: no member named '_fft_with_size' in namespace 'torch' cargo:warning= auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), normalization, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:627:53: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::_index_put_impl_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate, (bool)unsafe); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:562:93: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor & _index_put_impl_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false, bool unsafe=false); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:750:29: error: no member named '_multinomial_alias_draw' in namespace 'torch' cargo:warning= auto outputs__ = torch::_multinomial_alias_draw(*J, *q, num_samples); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:757:29: error: no member named '_multinomial_alias_setup' in namespace 'torch' cargo:warning= auto outputs__ = torch::_multinomial_alias_setup(*probs); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:816:29: error: no member named '_qr_helper' in namespace 'torch' cargo:warning= auto outputs__ = torch::_qr_helper(*self, (bool)some); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3487:93: error: too few arguments to function call, expected 6, have 5 cargo:warning= auto outputs__ = torch::elu_backward(*grad_output, *alpha, *scale, *input_scale, *output); cargo:warning= ~~~~~~~~~~~~~~~~~~~ ^ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:1812:18: note: 'elu_backward' declared here cargo:warning=TORCH_API Tensor elu_backward(const Tensor & grad_output, Scalar alpha, Scalar scale, Scalar input_scale, bool is_result, const Tensor & self_or_result); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3494:29: error: no member named 'elu_backward_out' in namespace 'torch' cargo:warning= auto outputs__ = torch::elu_backward_out(*grad_input, *grad_output, *alpha, *scale, *input_scale, *output); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3819:29: error: no member named 'fake_quantize_per_channel_affine_backward' in namespace 'torch' cargo:warning= auto outputs__ = torch::fake_quantize_per_channel_affine_backward(*grad, *self, *scale, *zero_point, axis, quant_min, quant_max); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3833:29: error: no member named 'fake_quantize_per_tensor_affine_backward' in namespace 'torch' cargo:warning= auto outputs__ = torch::fake_quantize_per_tensor_affine_backward(*grad, *self, scale, zero_point, quant_min, quant_max); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3917:29: error: unexpected namespace name 'fft': expected expression cargo:warning= auto outputs__ = torch::fft(*self, signal_ndim, (bool)normalized); cargo:warning= ^ cargo:warning=libtch/torch_api_generated.cpp.h:4914:29: error: no member named 'ifft' in namespace 'torch' cargo:warning= auto outputs__ = torch::ifft(*self, signal_ndim, (bool)normalized); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:4956:42: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::index(*self, of_carray_tensor(indices_data, indices_len)); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:557:86: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor index(const Tensor & self, const c10::List> & indices); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:5019:46: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::index_put(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:561:90: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor index_put(const Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:5026:47: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::index_put_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:560:87: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor & index_put_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); cargo:warning= ^ cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=] cargo:warning=20 errors generated. exit code: 1 --- stderr error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/user/.local/libtorch/include" "-I" "/Users/user/.local/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/user/.local/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/user/git/rust/rust-bert/target/debug/build/torch-sys-c9a36c0d279de21f/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp" with args "c++" did not execute successfully (status code exit code: 1). user@macOS: ~/git/rust/rust-bert (python-3.8.7) $ c user@macOS: ~/git/rust/rust-bert (python-3.8.7) $ cd user@macOS: ~ (python-3.8.7) $ c user@macOS: ~ (python-3.8.7) $ emacs user@macOS: ~ (python-3.8.7) $ z - user@macOS: ~/git/rust/rust-bert (python-3.8.7) $ c user@macOS: ~/git/rust/rust-bert (python-3.8.7) $ cargo build Compiling torch-sys v0.3.1 The following warnings were emitted during compilation: warning: clang: warning: -Wl,-rpath=/Users/user/.local/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument] warning: libtch/torch_api.cpp:142:9: error: no member named '_amp_non_finite_check_and_unscale_' in namespace 'at'; did you mean '_amp_foreach_non_finite_check_and_unscale_'? warning: at::_amp_non_finite_check_and_unscale_(*t, *found_inf, *inf_scale); warning: ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: _amp_foreach_non_finite_check_and_unscale_ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:1645:16: note: '_amp_foreach_non_finite_check_and_unscale_' declared here warning: TORCH_API void _amp_foreach_non_finite_check_and_unscale_(TensorList self, Tensor & found_inf, const Tensor & inv_scale); warning: ^ warning: libtch/torch_api.cpp:487:109: error: no viable conversion from 'vector' to 'bool' warning: auto vl = torch::autograd::Engine::get_default_engine().execute(roots, grads, keep_graph, create_graph, inputs_); warning: ^~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/torch/csrc/autograd/engine.h:275:12: note: passing argument to parameter 'accumulate_grad' here warning: bool accumulate_grad, warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:415:386: error: too few arguments to function call, expected 16, have 15 warning: auto outputs__ = torch::_cudnn_rnn(*input, of_carray_tensor(weight_data, weight_len), weight_stride0, (weight_buf ? *weight_buf : torch::Tensor()), *hx, (cx ? *cx : torch::Tensor()), mode, hidden_size, num_layers, (bool)batch_first, dropout, (bool)train, (bool)bidirectional, torch::IntArrayRef(batch_sizes_data, batch_sizes_len), (dropout_state ? *dropout_state : torch::Tensor())); warning: ~~~~~~~~~~~~~~~~~ ^ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:59:58: note: '_cudnn_rnn' declared here warning: TORCH_API std::tuple _cudnn_rnn(const Tensor & input, TensorList weight, int64_t weight_stride0, const c10::optional & weight_buf, const Tensor & hx, const c10::optional & cx, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, double dropout, bool train, bool bidirectional, IntArrayRef batch_sizes, const c10::optional & dropout_state); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:426:203: error: too few arguments to function call, expected 9, have 8 warning: auto outputs__ = torch::_cudnn_rnn_flatten_weight(of_carray_tensor(weight_arr_data, weight_arr_len), weight_stride0, input_size, mode, hidden_size, num_layers, (bool)batch_first, (bool)bidirectional); warning: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:58:18: note: '_cudnn_rnn_flatten_weight' declared here warning: TORCH_API Tensor _cudnn_rnn_flatten_weight(TensorList weight_arr, int64_t weight_stride0, int64_t input_size, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, bool bidirectional); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:576:29: error: no member named '_fft_with_size' in namespace 'torch' warning: auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), (bool)normalized, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: warning: libtch/torch_api_generated.cpp.h:583:29: error: no member named '_fft_with_size' in namespace 'torch' warning: auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), normalization, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: warning: libtch/torch_api_generated.cpp.h:627:53: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::_index_put_impl_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate, (bool)unsafe); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:562:93: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor & _index_put_impl_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false, bool unsafe=false); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:750:29: error: no member named '_multinomial_alias_draw' in namespace 'torch' warning: auto outputs__ = torch::_multinomial_alias_draw(*J, *q, num_samples); 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:1215: warning: libtch/torch_api_generated.cpp.h:757:29: error: no member named '_multinomial_alias_setup' in namespace 'torch' warning: auto outputs__ = torch::_multinomial_alias_setup(*probs); 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:1215: warning: libtch/torch_api_generated.cpp.h:816:29: error: no member named '_qr_helper' in namespace 'torch' warning: auto outputs__ = torch::_qr_helper(*self, (bool)some); 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:1215: warning: libtch/torch_api_generated.cpp.h:3487:93: error: too few arguments to function call, expected 6, have 5 warning: auto outputs__ = torch::elu_backward(*grad_output, *alpha, *scale, *input_scale, *output); warning: ~~~~~~~~~~~~~~~~~~~ ^ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:1812:18: note: 'elu_backward' declared here warning: TORCH_API Tensor elu_backward(const Tensor & grad_output, Scalar alpha, Scalar scale, Scalar input_scale, bool is_result, const Tensor & self_or_result); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:3494:29: error: no member named 'elu_backward_out' in namespace 'torch' warning: auto outputs__ = torch::elu_backward_out(*grad_input, *grad_output, *alpha, *scale, *input_scale, *output); 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:1215: warning: libtch/torch_api_generated.cpp.h:3819:29: error: no member named 'fake_quantize_per_channel_affine_backward' in namespace 'torch' warning: auto outputs__ = torch::fake_quantize_per_channel_affine_backward(*grad, *self, *scale, *zero_point, axis, quant_min, quant_max); 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:1215: warning: libtch/torch_api_generated.cpp.h:3833:29: error: no member named 'fake_quantize_per_tensor_affine_backward' in namespace 'torch' warning: auto outputs__ = torch::fake_quantize_per_tensor_affine_backward(*grad, *self, scale, zero_point, quant_min, quant_max); 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:1215: warning: libtch/torch_api_generated.cpp.h:3917:29: error: unexpected namespace name 'fft': expected expression warning: auto outputs__ = torch::fft(*self, signal_ndim, (bool)normalized); warning: ^ warning: libtch/torch_api_generated.cpp.h:4914:29: error: no member named 'ifft' in namespace 'torch' warning: auto outputs__ = torch::ifft(*self, signal_ndim, (bool)normalized); 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:1215: warning: libtch/torch_api_generated.cpp.h:4956:42: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::index(*self, of_carray_tensor(indices_data, indices_len)); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:557:86: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor index(const Tensor & self, const c10::List> & indices); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:5019:46: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::index_put(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:561:90: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor index_put(const Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); warning: ^ warning: In file included from libtch/torch_api.cpp:1215: warning: libtch/torch_api_generated.cpp.h:5026:47: error: no viable conversion from 'vector' to 'const c10::List>' warning: auto outputs__ = torch::index_put_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' warning: x \ warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument warning: List(std::initializer_list initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument warning: List(const List&) = default; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument warning: List(List&&) noexcept; warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate warning: explicit List(ArrayRef initial_values); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate warning: explicit List(TypePtr elementType); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate warning: explicit List(c10::intrusive_ptr&& elements); warning: ^ warning: /Users/user/.local/libtorch/include/ATen/Functions.h:560:87: note: passing argument to parameter 'indices' here warning: TORCH_API Tensor & index_put_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); 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.3.1` Caused by: process didn't exit successfully: `/Users/user/git/rust/rust-bert/target/debug/build/torch-sys-b5698cc78204d67c/build-script-build` (exit code: 1) --- stdout cargo:rerun-if-env-changed=TORCH_CUDA_VERSION cargo:rerun-if-env-changed=LIBTORCH cargo:rustc-link-search=native=/Users/user/.local/libtorch/lib cargo:rerun-if-env-changed=LIBTORCH_USE_CMAKE 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("x86_64-apple-darwin") OPT_LEVEL = Some("0") HOST = Some("x86_64-apple-darwin") CXX_x86_64-apple-darwin = None CXX_x86_64_apple_darwin = None HOST_CXX = None CXX = None CXXFLAGS_x86_64-apple-darwin = None CXXFLAGS_x86_64_apple_darwin = None HOST_CXXFLAGS = None CXXFLAGS = None 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" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/user/.local/libtorch/include" "-I" "/Users/user/.local/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/user/.local/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/user/git/rust/rust-bert/target/debug/build/torch-sys-c9a36c0d279de21f/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp" cargo:warning=clang: warning: -Wl,-rpath=/Users/user/.local/libtorch/lib: 'linker' input unused [-Wunused-command-line-argument] cargo:warning=libtch/torch_api.cpp:142:9: error: no member named '_amp_non_finite_check_and_unscale_' in namespace 'at'; did you mean '_amp_foreach_non_finite_check_and_unscale_'? cargo:warning= at::_amp_non_finite_check_and_unscale_(*t, *found_inf, *inf_scale); cargo:warning= ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning= _amp_foreach_non_finite_check_and_unscale_ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:1645:16: note: '_amp_foreach_non_finite_check_and_unscale_' declared here cargo:warning=TORCH_API void _amp_foreach_non_finite_check_and_unscale_(TensorList self, Tensor & found_inf, const Tensor & inv_scale); cargo:warning= ^ cargo:warning=libtch/torch_api.cpp:487:109: error: no viable conversion from 'vector' to 'bool' cargo:warning= auto vl = torch::autograd::Engine::get_default_engine().execute(roots, grads, keep_graph, create_graph, inputs_); cargo:warning= ^~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/torch/csrc/autograd/engine.h:275:12: note: passing argument to parameter 'accumulate_grad' here cargo:warning= bool accumulate_grad, cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:415:386: error: too few arguments to function call, expected 16, have 15 cargo:warning= auto outputs__ = torch::_cudnn_rnn(*input, of_carray_tensor(weight_data, weight_len), weight_stride0, (weight_buf ? *weight_buf : torch::Tensor()), *hx, (cx ? *cx : torch::Tensor()), mode, hidden_size, num_layers, (bool)batch_first, dropout, (bool)train, (bool)bidirectional, torch::IntArrayRef(batch_sizes_data, batch_sizes_len), (dropout_state ? *dropout_state : torch::Tensor())); cargo:warning= ~~~~~~~~~~~~~~~~~ ^ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:59:58: note: '_cudnn_rnn' declared here cargo:warning=TORCH_API std::tuple _cudnn_rnn(const Tensor & input, TensorList weight, int64_t weight_stride0, const c10::optional & weight_buf, const Tensor & hx, const c10::optional & cx, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, double dropout, bool train, bool bidirectional, IntArrayRef batch_sizes, const c10::optional & dropout_state); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:426:203: error: too few arguments to function call, expected 9, have 8 cargo:warning= auto outputs__ = torch::_cudnn_rnn_flatten_weight(of_carray_tensor(weight_arr_data, weight_arr_len), weight_stride0, input_size, mode, hidden_size, num_layers, (bool)batch_first, (bool)bidirectional); cargo:warning= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:58:18: note: '_cudnn_rnn_flatten_weight' declared here cargo:warning=TORCH_API Tensor _cudnn_rnn_flatten_weight(TensorList weight_arr, int64_t weight_stride0, int64_t input_size, int64_t mode, int64_t hidden_size, int64_t proj_size, int64_t num_layers, bool batch_first, bool bidirectional); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:576:29: error: no member named '_fft_with_size' in namespace 'torch' cargo:warning= auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), (bool)normalized, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:583:29: error: no member named '_fft_with_size' in namespace 'torch' cargo:warning= auto outputs__ = torch::_fft_with_size(*self, signal_ndim, (bool)complex_input, (bool)complex_output, (bool)inverse, torch::IntArrayRef(checked_signal_sizes_data, checked_signal_sizes_len), normalization, (bool)onesided, torch::IntArrayRef(output_sizes_data, output_sizes_len)); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:627:53: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::_index_put_impl_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate, (bool)unsafe); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:562:93: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor & _index_put_impl_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false, bool unsafe=false); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:750:29: error: no member named '_multinomial_alias_draw' in namespace 'torch' cargo:warning= auto outputs__ = torch::_multinomial_alias_draw(*J, *q, num_samples); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:757:29: error: no member named '_multinomial_alias_setup' in namespace 'torch' cargo:warning= auto outputs__ = torch::_multinomial_alias_setup(*probs); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:816:29: error: no member named '_qr_helper' in namespace 'torch' cargo:warning= auto outputs__ = torch::_qr_helper(*self, (bool)some); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3487:93: error: too few arguments to function call, expected 6, have 5 cargo:warning= auto outputs__ = torch::elu_backward(*grad_output, *alpha, *scale, *input_scale, *output); cargo:warning= ~~~~~~~~~~~~~~~~~~~ ^ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:1812:18: note: 'elu_backward' declared here cargo:warning=TORCH_API Tensor elu_backward(const Tensor & grad_output, Scalar alpha, Scalar scale, Scalar input_scale, bool is_result, const Tensor & self_or_result); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3494:29: error: no member named 'elu_backward_out' in namespace 'torch' cargo:warning= auto outputs__ = torch::elu_backward_out(*grad_input, *grad_output, *alpha, *scale, *input_scale, *output); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3819:29: error: no member named 'fake_quantize_per_channel_affine_backward' in namespace 'torch' cargo:warning= auto outputs__ = torch::fake_quantize_per_channel_affine_backward(*grad, *self, *scale, *zero_point, axis, quant_min, quant_max); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3833:29: error: no member named 'fake_quantize_per_tensor_affine_backward' in namespace 'torch' cargo:warning= auto outputs__ = torch::fake_quantize_per_tensor_affine_backward(*grad, *self, scale, zero_point, quant_min, quant_max); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:3917:29: error: unexpected namespace name 'fft': expected expression cargo:warning= auto outputs__ = torch::fft(*self, signal_ndim, (bool)normalized); cargo:warning= ^ cargo:warning=libtch/torch_api_generated.cpp.h:4914:29: error: no member named 'ifft' in namespace 'torch' cargo:warning= auto outputs__ = torch::ifft(*self, signal_ndim, (bool)normalized); 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:1215: cargo:warning=libtch/torch_api_generated.cpp.h:4956:42: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::index(*self, of_carray_tensor(indices_data, indices_len)); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:557:86: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor index(const Tensor & self, const c10::List> & indices); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:5019:46: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::index_put(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:561:90: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor index_put(const Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); cargo:warning= ^ cargo:warning=In file included from libtch/torch_api.cpp:1215: cargo:warning=libtch/torch_api_generated.cpp.h:5026:47: error: no viable conversion from 'vector' to 'const c10::List>' cargo:warning= auto outputs__ = torch::index_put_(*self, of_carray_tensor(indices_data, indices_len), *values, (bool)accumulate); cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=libtch/torch_api.h:16:5: note: expanded from macro 'PROTECT' cargo:warning= x \ cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:258:3: note: candidate constructor not viable: no known conversion from 'vector' to 'std::initializer_list>' for 1st argument cargo:warning= List(std::initializer_list initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:268:3: note: candidate constructor not viable: no known conversion from 'vector' to 'const c10::List> &' for 1st argument cargo:warning= List(const List&) = default; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:270:3: note: candidate constructor not viable: no known conversion from 'vector' to 'c10::List> &&' for 1st argument cargo:warning= List(List&&) noexcept; cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:259:12: note: explicit constructor is not a candidate cargo:warning= explicit List(ArrayRef initial_values); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:266:12: note: explicit constructor is not a candidate cargo:warning= explicit List(TypePtr elementType); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/core/List.h:462:12: note: explicit constructor is not a candidate cargo:warning= explicit List(c10::intrusive_ptr&& elements); cargo:warning= ^ cargo:warning=/Users/user/.local/libtorch/include/ATen/Functions.h:560:87: note: passing argument to parameter 'indices' here cargo:warning=TORCH_API Tensor & index_put_(Tensor & self, const c10::List> & indices, const Tensor & values, bool accumulate=false); cargo:warning= ^ cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=] cargo:warning=20 errors generated. exit code: 1 --- stderr error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/user/.local/libtorch/include" "-I" "/Users/user/.local/libtorch/include/torch/csrc/api/include" "-Wl,-rpath=/Users/user/.local/libtorch/lib" "-std=c++14" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/Users/user/git/rust/rust-bert/target/debug/build/torch-sys-c9a36c0d279de21f/out/libtch/torch_api.o" "-c" "libtch/torch_api.cpp" with args "c++" did not execute successfully (status code exit code: 1).
guillaume-be commented 3 years ago

hello @liebkne ,

I unfortunately do not have a mac to do further testing, but I included macOS to the list of targets for the continuous integration. I just ran the pipeline, and the build seems to be working (see https://github.com/guillaume-be/rust-bert/runs/2040286210?check_suite_focus=true).

You mention that you tried building tch-rs and it works fine. My guess is that by building tch-rs, you automatically downloaded the matching version of Libtorch. I see that yesterday, the tch-rs author pushed to master some changes updating the version of Libtorch to 1.8. This library uses the latest published version of tch-rs that relies on libtorch 1.7. By building rust-bert, I guess you are trying to use the version of tch-rs that expects Libtorch 1.7 with Libtorch 1.8.

Could you try deleting your current libtorch installation (/Users/user/.local/libtorch) and try to build the library again? If the automatic download does not work, please make sure you download Libtorch 1.7 before building again.

Please let me know how this work.

failable commented 3 years ago

Hi @guillaume-be ,

I installed libtorch 1.8.0 manually yesterday as I saw this. I thought torch-sys is expecting 1.8.0.

Followed you advice, I manually downgraded libtorch to 1.7.1 and everything just fine. Thank you! Maybe we should mention this somewhere?

I have one more question, how I can get my local version rust_model.ot of pretrained weights?


Update:

I notice that the ot model is mentioned in the issues of tch library. I guess I should use tch to convert the model pt file.


Update again...

I should the the utils directory and this issue more carefully! 😅

bhickey commented 3 years ago

Unfortunately pyTorch has yanked the 1.7.0 and 1.7.1 libtorch binaries.

guillaume-be commented 3 years ago

@bhickey These versions are indeed no longer listed on their website, but can still be download by modifying the URL provided on their homepage with the target version/OS.

For example:

I will push an update to libtorch 1.8.1 in the next few days.

paulbricman commented 3 years ago

@liebkne could you please share the way you set up your environment variables for running rust-bert on mac? Did you just follow the Linux instructions but using $DYLD_LIBRARY_PATH instead of $LD_LIBRARY_PATH?

failable commented 3 years ago

@paulbricman Hi, IIRC, I did something like

lib=$(rustc --print sysroot)/lib

for f in "$LIBTORCH/lib"/*.dylib
do
    ln -sv "$f" "$lib/$(basename $f)"
done

to link the libraries to Rust. Setting *_LIBRARY_PATH did not help and I don't know why cargo failed to find them. I'm a Rust newbie and don't find any better solution right now.

paulbricman commented 3 years ago

Huh, interesting. Thanks so much for sharing! I'll try it soon and edit this with the outcome.