idiap / fast-transformers

Pytorch library for fast transformer implementations
1.65k stars 179 forks source link

Installing error on linux #112

Closed xxmlala closed 2 years ago

xxmlala commented 2 years ago

I tried to install fast-transformers and meet this error. I used pytorch 1.9.1. Need I install the gcc of older version? I want to ask for your help about this problem first because it's not convenient for me to transfer the version of gcc.

xxxxxxxxx:~/work/INSTALL/pytorch-fast-transformers/fast-transformers$ python setup.py  install
/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/package/_mock_zipreader.py:17: UserWarning: Failed to initialize NumPy: numpy.core.multiarray failed to import (Triggered internally at  /pytorch/torch/csrc/utils/tensor_numpy.cpp:67.)
  _dtype_to_storage = {data_type(0).dtype: data_type for data_type in _storages}
running install
/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  setuptools.SetuptoolsDeprecationWarning,
/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  EasyInstallDeprecationWarning,
running bdist_egg
running egg_info
creating pytorch_fast_transformers.egg-info
writing pytorch_fast_transformers.egg-info/PKG-INFO
writing dependency_links to pytorch_fast_transformers.egg-info/dependency_links.txt
writing requirements to pytorch_fast_transformers.egg-info/requires.txt
writing top-level names to pytorch_fast_transformers.egg-info/top_level.txt
writing manifest file 'pytorch_fast_transformers.egg-info/SOURCES.txt'
/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/utils/cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'pytorch_fast_transformers.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'pytorch_fast_transformers.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/fast_transformers
copying fast_transformers/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers
copying fast_transformers/masking.py -> build/lib.linux-x86_64-3.7/fast_transformers
copying fast_transformers/transformers.py -> build/lib.linux-x86_64-3.7/fast_transformers
copying fast_transformers/utils.py -> build/lib.linux-x86_64-3.7/fast_transformers
copying fast_transformers/weight_mapper.py -> build/lib.linux-x86_64-3.7/fast_transformers
creating build/lib.linux-x86_64-3.7/fast_transformers/aggregate
copying fast_transformers/aggregate/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/aggregate
creating build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/aft_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/attention_layer.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/causal_linear_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/clustered_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/conditional_full_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/exact_topk_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/full_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/improved_clustered_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/improved_clustered_causal_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/linear_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/local_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
copying fast_transformers/attention/reformer_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention
creating build/lib.linux-x86_64-3.7/fast_transformers/attention_registry
copying fast_transformers/attention_registry/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention_registry
copying fast_transformers/attention_registry/registry.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention_registry
copying fast_transformers/attention_registry/spec.py -> build/lib.linux-x86_64-3.7/fast_transformers/attention_registry
creating build/lib.linux-x86_64-3.7/fast_transformers/builders
copying fast_transformers/builders/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/builders
copying fast_transformers/builders/attention_builders.py -> build/lib.linux-x86_64-3.7/fast_transformers/builders
copying fast_transformers/builders/base.py -> build/lib.linux-x86_64-3.7/fast_transformers/builders
copying fast_transformers/builders/transformer_builders.py -> build/lib.linux-x86_64-3.7/fast_transformers/builders
creating build/lib.linux-x86_64-3.7/fast_transformers/causal_product
copying fast_transformers/causal_product/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/causal_product
creating build/lib.linux-x86_64-3.7/fast_transformers/clustering
copying fast_transformers/clustering/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/clustering
creating build/lib.linux-x86_64-3.7/fast_transformers/events
copying fast_transformers/events/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/events
copying fast_transformers/events/event.py -> build/lib.linux-x86_64-3.7/fast_transformers/events
copying fast_transformers/events/event_dispatcher.py -> build/lib.linux-x86_64-3.7/fast_transformers/events
copying fast_transformers/events/filters.py -> build/lib.linux-x86_64-3.7/fast_transformers/events
creating build/lib.linux-x86_64-3.7/fast_transformers/feature_maps
copying fast_transformers/feature_maps/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/feature_maps
copying fast_transformers/feature_maps/base.py -> build/lib.linux-x86_64-3.7/fast_transformers/feature_maps
copying fast_transformers/feature_maps/fourier_features.py -> build/lib.linux-x86_64-3.7/fast_transformers/feature_maps
creating build/lib.linux-x86_64-3.7/fast_transformers/hashing
copying fast_transformers/hashing/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/hashing
creating build/lib.linux-x86_64-3.7/fast_transformers/local_product
copying fast_transformers/local_product/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/local_product
creating build/lib.linux-x86_64-3.7/fast_transformers/recurrent
copying fast_transformers/recurrent/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent
copying fast_transformers/recurrent/_utils.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent
copying fast_transformers/recurrent/transformers.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent
creating build/lib.linux-x86_64-3.7/fast_transformers/sparse_product
copying fast_transformers/sparse_product/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/sparse_product
creating build/lib.linux-x86_64-3.7/fast_transformers/clustering/hamming
copying fast_transformers/clustering/hamming/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/clustering/hamming
creating build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention
copying fast_transformers/recurrent/attention/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention
creating build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/cross_attention
copying fast_transformers/recurrent/attention/cross_attention/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/cross_attention
copying fast_transformers/recurrent/attention/cross_attention/attention_layer.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/cross_attention
copying fast_transformers/recurrent/attention/cross_attention/full_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/cross_attention
copying fast_transformers/recurrent/attention/cross_attention/linear_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/cross_attention
creating build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/self_attention
copying fast_transformers/recurrent/attention/self_attention/__init__.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/self_attention
copying fast_transformers/recurrent/attention/self_attention/attention_layer.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/self_attention
copying fast_transformers/recurrent/attention/self_attention/full_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/self_attention
copying fast_transformers/recurrent/attention/self_attention/linear_attention.py -> build/lib.linux-x86_64-3.7/fast_transformers/recurrent/attention/self_attention
creating build/lib.linux-x86_64-3.7/tests
creating build/lib.linux-x86_64-3.7/tests/aggregate
copying tests/aggregate/__init__.py -> build/lib.linux-x86_64-3.7/tests/aggregate
copying tests/aggregate/test_aggregate_cpu.py -> build/lib.linux-x86_64-3.7/tests/aggregate
copying tests/aggregate/test_aggregate_gpu.py -> build/lib.linux-x86_64-3.7/tests/aggregate
copying tests/aggregate/test_clustered_aggregate_cpu.py -> build/lib.linux-x86_64-3.7/tests/aggregate
copying tests/aggregate/test_clustered_aggregate_gpu.py -> build/lib.linux-x86_64-3.7/tests/aggregate
copying tests/aggregate/test_clustered_broadcast_cpu.py -> build/lib.linux-x86_64-3.7/tests/aggregate
copying tests/aggregate/test_clustered_broadcast_gpu.py -> build/lib.linux-x86_64-3.7/tests/aggregate
creating build/lib.linux-x86_64-3.7/tests/causal_product
copying tests/causal_product/__init__.py -> build/lib.linux-x86_64-3.7/tests/causal_product
copying tests/causal_product/test_causal_product.py -> build/lib.linux-x86_64-3.7/tests/causal_product
copying tests/causal_product/test_causal_product_cpu.py -> build/lib.linux-x86_64-3.7/tests/causal_product
copying tests/causal_product/test_causal_product_gpu.py -> build/lib.linux-x86_64-3.7/tests/causal_product
creating build/lib.linux-x86_64-3.7/tests/clustering
copying tests/clustering/__init__.py -> build/lib.linux-x86_64-3.7/tests/clustering
creating build/lib.linux-x86_64-3.7/tests/events
copying tests/events/__init__.py -> build/lib.linux-x86_64-3.7/tests/events
copying tests/events/test_event_dispatcher.py -> build/lib.linux-x86_64-3.7/tests/events
copying tests/events/test_event_filters.py -> build/lib.linux-x86_64-3.7/tests/events
copying tests/events/test_events.py -> build/lib.linux-x86_64-3.7/tests/events
creating build/lib.linux-x86_64-3.7/tests/feature_maps
copying tests/feature_maps/__init__.py -> build/lib.linux-x86_64-3.7/tests/feature_maps
copying tests/feature_maps/test_fourier_features.py -> build/lib.linux-x86_64-3.7/tests/feature_maps
creating build/lib.linux-x86_64-3.7/tests/hashing
copying tests/hashing/__init__.py -> build/lib.linux-x86_64-3.7/tests/hashing
copying tests/hashing/test_hash_cpu.py -> build/lib.linux-x86_64-3.7/tests/hashing
copying tests/hashing/test_hash_gpu.py -> build/lib.linux-x86_64-3.7/tests/hashing
creating build/lib.linux-x86_64-3.7/tests/recurrent
copying tests/recurrent/__init__.py -> build/lib.linux-x86_64-3.7/tests/recurrent
copying tests/recurrent/test_transformer_decoder.py -> build/lib.linux-x86_64-3.7/tests/recurrent
copying tests/recurrent/test_transformer_encoder.py -> build/lib.linux-x86_64-3.7/tests/recurrent
creating build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/__init__.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_product_backward_cpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_product_backward_cpu_v2.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_product_backward_gpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_product_cpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_product_cpu_v2.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_product_gpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_weighted_average_cpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_weighted_average_cpu_v2.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_clustered_sparse_weighted_average_gpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_sparse_product_backward_cpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_sparse_product_backward_gpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_sparse_product_cpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_sparse_product_gpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_sparse_weighted_average_cpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
copying tests/sparse_product/test_sparse_weighted_average_gpu.py -> build/lib.linux-x86_64-3.7/tests/sparse_product
creating build/lib.linux-x86_64-3.7/tests/clustering/hamming
copying tests/clustering/hamming/__init__.py -> build/lib.linux-x86_64-3.7/tests/clustering/hamming
copying tests/clustering/hamming/test_cluster_cpu.py -> build/lib.linux-x86_64-3.7/tests/clustering/hamming
copying tests/clustering/hamming/test_cluster_gpu.py -> build/lib.linux-x86_64-3.7/tests/clustering/hamming
copying tests/clustering/hamming/test_python_api_gpu.py -> build/lib.linux-x86_64-3.7/tests/clustering/hamming
copying tests/clustering/hamming/time_python_api_gpu.py -> build/lib.linux-x86_64-3.7/tests/clustering/hamming
creating build/lib.linux-x86_64-3.7/tests/recurrent/attention
copying tests/recurrent/attention/__init__.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention
creating build/lib.linux-x86_64-3.7/tests/recurrent/attention/cross_attention
copying tests/recurrent/attention/cross_attention/__init__.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/cross_attention
copying tests/recurrent/attention/cross_attention/test_attention_layer.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/cross_attention
copying tests/recurrent/attention/cross_attention/test_full_attention.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/cross_attention
copying tests/recurrent/attention/cross_attention/test_linear_attention.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/cross_attention
creating build/lib.linux-x86_64-3.7/tests/recurrent/attention/self_attention
copying tests/recurrent/attention/self_attention/__init__.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/self_attention
copying tests/recurrent/attention/self_attention/test_attention_layer.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/self_attention
copying tests/recurrent/attention/self_attention/test_full_attention.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/self_attention
copying tests/recurrent/attention/self_attention/test_linear_attention.py -> build/lib.linux-x86_64-3.7/tests/recurrent/attention/self_attention
running build_ext
building 'fast_transformers.hashing.hash_cpu' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/fast_transformers
creating build/temp.linux-x86_64-3.7/fast_transformers/hashing
gcc -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/hashing/hash_cpu.cpp -o build/temp.linux-x86_64-3.7/fast_transformers/hashing/hash_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=hash_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -L/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,-rpath=/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/fast_transformers/hashing/hash_cpu.o -L/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.7/fast_transformers/hashing/hash_cpu.cpython-37m-x86_64-linux-gnu.so
building 'fast_transformers.aggregate.aggregate_cpu' extension
creating build/temp.linux-x86_64-3.7/fast_transformers/aggregate
gcc -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/aggregate/aggregate_cpu.cpp -o build/temp.linux-x86_64-3.7/fast_transformers/aggregate/aggregate_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=aggregate_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -L/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,-rpath=/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/fast_transformers/aggregate/aggregate_cpu.o -L/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.7/fast_transformers/aggregate/aggregate_cpu.cpython-37m-x86_64-linux-gnu.so
building 'fast_transformers.clustering.hamming.cluster_cpu' extension
creating build/temp.linux-x86_64-3.7/fast_transformers/clustering
creating build/temp.linux-x86_64-3.7/fast_transformers/clustering/hamming
gcc -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/clustering/hamming/cluster_cpu.cpp -o build/temp.linux-x86_64-3.7/fast_transformers/clustering/hamming/cluster_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=cluster_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -L/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,-rpath=/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/fast_transformers/clustering/hamming/cluster_cpu.o -L/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.7/fast_transformers/clustering/hamming/cluster_cpu.cpython-37m-x86_64-linux-gnu.so
building 'fast_transformers.sparse_product.sparse_product_cpu' extension
creating build/temp.linux-x86_64-3.7/fast_transformers/sparse_product
gcc -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/sparse_product/sparse_product_cpu.cpp -o build/temp.linux-x86_64-3.7/fast_transformers/sparse_product/sparse_product_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=sparse_product_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -L/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,-rpath=/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/fast_transformers/sparse_product/sparse_product_cpu.o -L/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.7/fast_transformers/sparse_product/sparse_product_cpu.cpython-37m-x86_64-linux-gnu.so
building 'fast_transformers.sparse_product.clustered_sparse_product_cpu' extension
gcc -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/sparse_product/clustered_sparse_product_cpu.cpp -o build/temp.linux-x86_64-3.7/fast_transformers/sparse_product/clustered_sparse_product_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=clustered_sparse_product_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -L/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,-rpath=/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/fast_transformers/sparse_product/clustered_sparse_product_cpu.o -L/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.7/fast_transformers/sparse_product/clustered_sparse_product_cpu.cpython-37m-x86_64-linux-gnu.so
building 'fast_transformers.causal_product.causal_product_cpu' extension
creating build/temp.linux-x86_64-3.7/fast_transformers/causal_product
gcc -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/causal_product/causal_product_cpu.cpp -o build/temp.linux-x86_64-3.7/fast_transformers/causal_product/causal_product_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=causal_product_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -L/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,-rpath=/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/fast_transformers/causal_product/causal_product_cpu.o -L/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.7/fast_transformers/causal_product/causal_product_cpu.cpython-37m-x86_64-linux-gnu.so
building 'fast_transformers.local_product.local_product_cpu' extension
creating build/temp.linux-x86_64-3.7/fast_transformers/local_product
gcc -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/local_product/local_product_cpu.cpp -o build/temp.linux-x86_64-3.7/fast_transformers/local_product/local_product_cpu.o -fopenmp -ffast-math -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=local_product_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -pthread -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/jovyan/work/conda-envs/mm21_py3/compiler_compat -L/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,-rpath=/home/jovyan/work/conda-envs/mm21_py3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/fast_transformers/local_product/local_product_cpu.o -L/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.7/fast_transformers/local_product/local_product_cpu.cpython-37m-x86_64-linux-gnu.so
building 'fast_transformers.hashing.hash_cuda' extension
/usr/local/cuda/bin/nvcc -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/TH -I/home/jovyan/work/conda-envs/mm21_py3/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/jovyan/work/conda-envs/mm21_py3/include/python3.7m -c fast_transformers/hashing/hash_cuda.cu -o build/temp.linux-x86_64-3.7/fast_transformers/hashing/hash_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=hash_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 -std=c++14
In file included from /usr/local/cuda/include/host_config.h:50:0,
                 from /usr/local/cuda/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/local/cuda/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
 #error -- unsupported GNU version! gcc versions later than 6 are not supported!
  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1
radandreicristian commented 2 years ago

I have a similar issue with a long stack trace with some gcc errors.

Ubuntu 21.04 GCC 10.3.0 CUDA 11.3 Torch ~1.10

xxmlala commented 2 years ago

I solved the problem by change the pytorch to right version according to the version of cuda.

my version info is as follows:

ashok-arjun commented 1 year ago

@xxmlala Thanks for the info. Which GCC version did you use?

xxmlala commented 1 year ago

@xxmlala Thanks for the info. Which GCC version did you use?

Sorry for that I forgot the GCC version during meeting that error and i cannot check it now because I am not able to using that server anymore for some reasons~