xformers icon indicating copy to clipboard operation
xformers copied to clipboard

fatal error: cuda_fp8.h: No such file or directory

Open hypily123 opened this issue 5 months ago • 3 comments

❓ Questions and Help

Hi,

I was trying to build xformer from the source. But encountered an error and have no idea about it. System information:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

Here are the steps to reproduce the issue on my end:

conda create -n test python=3.8.*
conda activate test
conda install -c omgarcia gcc-6 #downgrade gcc
pip install ninja
pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers

Here is the error:

In file included from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim256_fp16_sm80.cu:5:
  /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:22: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
                        ^
  compilation terminated.
  [13/49] /usr/bin/nvcc  -I/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn -I/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src -I/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/TH -I/home/qw/.local/lib/python3.8/site-packages/torch/include/THC -I/home/qw/anaconda3/envs/test/include/python3.8 -c -c /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.cu -o /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/build/temp.linux-x86_64-3.8/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.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'"'"'' -DHAS_PYTORCH --use_fast_math -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ --extended-lambda -D_ENABLE_EXTENDED_ALIGNED_STORAGE -std=c++17 --generate-line-info -DNDEBUG --threads 4 --ptxas-options=-v -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_90,code=sm_90 --generate-line-info -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C_flashattention -D_GLIBCXX_USE_CXX11_ABI=0
  FAILED: /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/build/temp.linux-x86_64-3.8/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.o
  /usr/bin/nvcc  -I/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn -I/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src -I/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/TH -I/home/qw/.local/lib/python3.8/site-packages/torch/include/THC -I/home/qw/anaconda3/envs/test/include/python3.8 -c -c /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.cu -o /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/build/temp.linux-x86_64-3.8/tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.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'"'"'' -DHAS_PYTORCH --use_fast_math -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ --extended-lambda -D_ENABLE_EXTENDED_ALIGNED_STORAGE -std=c++17 --generate-line-info -DNDEBUG --threads 4 --ptxas-options=-v -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_90,code=sm_90 --generate-line-info -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C_flashattention -D_GLIBCXX_USE_CXX11_ABI=0
  nvcc warning : The -std=c++17 flag is not supported with the configured host compiler. Flag will be ignored.
  In file included from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.cu:5:
  /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:22: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
                        ^
  compilation terminated.
  In file included from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.cu:5:
  /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:22: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
                        ^
  compilation terminated.
  In file included from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.cu:5:
  /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:22: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
                        ^
  compilation terminated.
  In file included from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim192_bf16_sm80.cu:5:
  /tmp/pip-install-m2g7y3nd/xformers_1a0add33070f46c7845a9cc9f68de3ab/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:22: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
                        ^
  compilation terminated.

Could you please help me solving this issue?

hypily123 avatar Jan 18 '24 06:01 hypily123

Hi, Why did you try to downgrade gcc? Also, what cuda version are you using ("nvcc --version")

danthe3rd avatar Jan 18 '24 10:01 danthe3rd

Hi, Why did you try to downgrade gcc? Also, what cuda version are you using ("nvcc --version")

Hi, because I encountered following problem if I do not downgrade gcc

[13/49] /usr/bin/nvcc  -I/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn -I/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src -I/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/TH -I/home/qw/.local/lib/python3.8/site-packages/torch/include/THC -I/home/qw/anaconda3/envs/test/include/python3.8 -c -c /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.cu -o /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/build/temp.linux-x86_64-3.8/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.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'"'"'' -DHAS_PYTORCH --use_fast_math -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ --extended-lambda -D_ENABLE_EXTENDED_ALIGNED_STORAGE -std=c++17 --generate-line-info -DNDEBUG --threads 4 --ptxas-options=-v -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_90,code=sm_90 --generate-line-info -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C_flashattention -D_GLIBCXX_USE_CXX11_ABI=0
  FAILED: /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/build/temp.linux-x86_64-3.8/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.o
  /usr/bin/nvcc  -I/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn -I/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src -I/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/qw/.local/lib/python3.8/site-packages/torch/include/TH -I/home/qw/.local/lib/python3.8/site-packages/torch/include/THC -I/home/qw/anaconda3/envs/test/include/python3.8 -c -c /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.cu -o /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/build/temp.linux-x86_64-3.8/tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.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'"'"'' -DHAS_PYTORCH --use_fast_math -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ --extended-lambda -D_ENABLE_EXTENDED_ALIGNED_STORAGE -std=c++17 --generate-line-info -DNDEBUG --threads 4 --ptxas-options=-v -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_90,code=sm_90 --generate-line-info -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C_flashattention -D_GLIBCXX_USE_CXX11_ABI=0
  In file included from /usr/include/host_config.h:50:0,
                   from /usr/include/cuda_runtime.h:78,
                   from <command-line>:0:
  /usr/include/crt/host_config.h:121: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!
    ^~~~~
  In file included from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.cu:5:
  /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:10: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
            ^~~~~~~~~~~~
  compilation terminated.
  In file included from /usr/include/host_config.h:50:0,
                   from /usr/include/cuda_runtime.h:78,
                   from <command-line>:0:
  /usr/include/crt/host_config.h:121: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!
    ^~~~~
  In file included from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.cu:5:
  /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:10: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
            ^~~~~~~~~~~~
  compilation terminated.
  In file included from /usr/include/host_config.h:50:0,
                   from /usr/include/cuda_runtime.h:78,
                   from <command-line>:0:
  /usr/include/crt/host_config.h:121: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!
    ^~~~~
  In file included from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.cu:5:
  /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:10: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
            ^~~~~~~~~~~~
  compilation terminated.
  In file included from /usr/include/host_config.h:50:0,
                   from /usr/include/cuda_runtime.h:78,
                   from <command-line>:0:
  /usr/include/crt/host_config.h:121: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!
    ^~~~~
  In file included from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/half.h:76:0,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/numeric_types.h:77,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/numeric/half.hpp:35,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/config.hpp:153,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cute/algorithm/copy.hpp:33,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_kernel.h:7,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_launch_template.h:9,
                   from /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/flash_attn/src/flash_bwd_hdim64_bf16_sm80.cu:5:
  /tmp/pip-install-k2gno2hd/xformers_35e8e9a7ec3e49028a1647b1f5f1048e/third_party/flash-attention/csrc/cutlass/include/cutlass/float8.h:83:10: fatal error: cuda_fp8.h: No such file or directory
   #include <cuda_fp8.h>
            ^~~~~~~~~~~~
  compilation terminated.

I am using cuda 11.8

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0

hypily123 avatar Jan 18 '24 13:01 hypily123

I received something similar:

unsupported GNU version! gcc versions later than 12 are not supported! 

I was on 13.8. Compiling with GCC 11.4 worked.

rahulrajaram avatar Feb 18 '24 08:02 rahulrajaram