关于安装时出现UserWarning: There are no g++ version bounds defined for CUDA version 12.4
今天尝试安装ktransformers,发现报错UserWarning: There are no g++ version bounds defined for CUDA version 12.4,原本以为是gcc版本文件,尝试过多个版本后,仍然出错。
目前使用的环境版本如下:
NVIDIA-SMI 550.127.08 Driver Version: 550.127.08 CUDA Version: 12.4
[root@model ~]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/13.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --disable-multilib --enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC)
在网上搜集资料,发现如下版本对应关系,也就是目前cuda和gcc版本是匹配的
在报错日志在查看到相关处理文件后
查看报错文件 /root/anaconda3/envs/ktransformers/lib/python3.11/site-packages/torch/utils/cpp_extension.py
找到了相关字段如下,字典中约束了使用的CUDA_版本和gcc版本的范围:
# The following values were taken from the following GitHub gist that
# summarizes the minimum valid major versions of g++/clang++ for each supported
# CUDA version: https://gist.github.com/ax3l/9489132
# Or from include/crt/host_config.h in the CUDA SDK
# The second value is the exclusive(!) upper bound, i.e. min <= version < max
CUDA_GCC_VERSIONS: VersionMap = {
'11.0': (MINIMUM_GCC_VERSION, (10, 0)),
'11.1': (MINIMUM_GCC_VERSION, (11, 0)),
'11.2': (MINIMUM_GCC_VERSION, (11, 0)),
'11.3': (MINIMUM_GCC_VERSION, (11, 0)),
'11.4': ((6, 0, 0), (12, 0)),
'11.5': ((6, 0, 0), (12, 0)),
'11.6': ((6, 0, 0), (12, 0)),
'11.7': ((6, 0, 0), (12, 0)),
}
MINIMUM_CLANG_VERSION = (3, 3, 0)
CUDA_CLANG_VERSIONS: VersionMap = {
'11.1': (MINIMUM_CLANG_VERSION, (11, 0)),
'11.2': (MINIMUM_CLANG_VERSION, (12, 0)),
'11.3': (MINIMUM_CLANG_VERSION, (12, 0)),
'11.4': (MINIMUM_CLANG_VERSION, (13, 0)),
'11.5': (MINIMUM_CLANG_VERSION, (13, 0)),
'11.6': (MINIMUM_CLANG_VERSION, (14, 0)),
'11.7': (MINIMUM_CLANG_VERSION, (14, 0)),
}
目前不知道是不是这个影响的
解决了吗 老铁我也卡这里了, 这个项目坑太多了!!!!!!!!!!!!
同样的问题!
解决了吗 老铁我也卡这里了, 这个项目坑太多了!!!!!!!!!!!!
还没解决,😂
+1
你们看看cmake版本,一样的报错,更新cmake到最新版本后编译通过
+1,重装cuda、更新cmake和降级gcc、g++均无法解决该问题。
gcc 降低到11.4.0试试
gcc 11.2.1, cmake 3.31.5, cuda 12.4, torch 2.4 安装成功,我之前失败是因为torch安装了2.6,cmake是3.6.1
gcc 11.2.1, cmake 3.31.5, cuda 12.4, torch 2.4 安装成功,我之前失败是因为torch安装了2.6,cmake是3.6.1
我使用了下面的环境重新安装
仍然显示了错误
gcc 降低到11.4.0试试
尝试过,任然失败
我也遇到一样的报错,没解决。这项目坑真多!