====== paddlematerials常见问题 ====== ===== cuda13.0安装不上 paddle_scatter 的问题 ===== paddlematerials 里 链接引用了 https://github.com/PFCCLab/paddle_scatter/tree/8efe9af96bf2f98be9c4bc7ecf5dff471875149a 没有更新到最新 paddle_scatter 的代码里没有兼容cuda13.x,导致安装有点问题。 咱们也不贸然升级版本,最新的main分支是支持了 13.x ,免得有问题,直接补丁一下 找到setup_ops.py 文件修订如下: def set_cuda_archs(): major, _ = paddle.version.cuda_version.split(".") if int(major) >= 13: # CUDA 13.0 minimum is sm_75 (Turing), supports up to Blackwell (sm_120/121) # Supported: 75, 80, 86, 87, 88, 89, 90, 100, 103, 110, 120, 121 paddle_known_gpu_archs = [75, 80, 86, 87, 89, 90, 100, 120] elif int(major) >= 12: paddle_known_gpu_archs = [50, 60, 61, 70, 75, 80, 86, 89, 90] elif int(major) >= 11: paddle_known_gpu_archs = [50, 60, 61, 70, 75, 80, 86] elif int(major) >= 10: paddle_known_gpu_archs = [50, 52, 60, 61, 70, 75] else: raise ValueError("Not support cuda version.") os.environ["PADDLE_CUDA_ARCH_LIST"] = ",".join( [str(arch) for arch in paddle_known_gpu_archs] )