如果你使用了3090,请使用cuda11.1 并配合一下命令
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
cd apex
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
亦可见我在github的回答
https://github.com/huggingface/transfer-learning-conv-ai/issues/9#issuecomment-1020901050