Non-root users install cuda, pytorch, and pyg, and use ncu to analyze the pyg program.

Read this tutorial first and install cuda and cudnn in your own directory. https://zhuanlan.zhihu.com/p/198161777 In this tutorial, when writing the sentences about environment variables, the middle sentence should be export PATH="/public/home/jd_lulin/cuda-10.1/bin:$PATH", Instead of the export PATH=$PATH:/home/zhaoqc/cuda-10.2/bin written in the text, please note that the path and version number that appear in the text should be replaced with your own depending on the situation.

After the installation is complete, if nvcc -V shows that cuda is the version you installed, it is successful. Then you can install pytorch. To install pytorch, you install it into a virtual environment, so you need to create a virtual environment first. Enter the command conda create -n pyg python=3.8 to create a virtual environment named pyg with python3.8. After creation, enter the virtual environment pyg and install pytorch: enter the command conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch and then install it (what is the specific command, You need to go to the download page of the pytorch official website, find the version you want, and then select its corresponding command). After that, enter python on the command line, then enter import torch to see if the installation is successful.

Then install pytorch geometric. https://blog.csdn.net/rothschild666/article/details/121696447?spm=1001.2014.3001.5506 Just read this blog

Finally, when using ncu on the linux server, an error message appears: Insufficient permissions. So use the following command: sudo ncu absolute path -o report name python absolute path xxx.py

Guess you like

Origin blog.csdn.net/illyh/article/details/131946835