1.环境搭建
a.pytorch和cuda的问题
报错:
UserWarning:
NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.
If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
RuntimeError: CUDA error: no kernel image is available for execution on the device
ref:知乎如何解决Pytorch的GPU driver is too old的问题?
卸载之前安装的pip uninstall
查看cuda版本:nvidia-smi
根据查看到的cuda版本到pytorch官网previous version找到合适的wheel
例如:pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
btw:如果需要安装pytorch-scatter之类的,如有版本要求,则需要先去pyg官网核对版本对应的previous wheel,两方确定后再决定下载torch的版本
b.pyg的问题
参见a.3.b
如需要更换版本,则需要先把之前的scatter之类先卸载,再重新安装
如果你还需要装geometric啥的,那就需要将原先的一些torch-scatter之类的包 先卸载掉,然后再去官网装
https://blog.csdn.net/weixin_39417324/article/details/122091582