官术网_书友最值得收藏!

Installing the CUDA Toolkit (Linux)

In the case of Linux users, you will see that there are choices for using a .deb package and a .run file; for most users, I would suggest going with the .deb file, since this will install any missing packages that CUDA requires automatically. The .run file installs outside of your system's Advanced Package Tool (APT) system, which effectively just copies the appropriate files to the system's /usr binary and library directories. If you don't want to interfere with your system's APT system or repositories, and have a good understanding of Linux, the .run file may be more appropriate. In either case, carefully follow the instructions given on the site about installing the package, which can vary slightly from one version to the next.

After the package is finished installing, you may have to configure your PATH and LD_SYSTEM_CONFIG environment variables so that your system can find the appropriate binary executable and library files needed for CUDA. I would suggest doing this by appending the followiang lines to the end of your .bashrc file in your user directory. Open the ~/.bashrc file with your favorite text editor, such as gedit, nano, emacs, or vim, and, at the very bottom of the file, add the following lines:

export PATH="/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"

Save the file and then exit the Terminal. You can now ensure that you've correctly installed the toolkit by opening a new Terminal and typing nvcc --version and then pressing Enter, which will give you the version information of the compiler for your toolkit. (nvcc is the command-line CUDA C compiler, which is analogous to the gcc compiler.)

主站蜘蛛池模板: 吉木萨尔县| 龙井市| 聂荣县| 衡南县| 如皋市| 图片| 浮梁县| 佛山市| 云霄县| 定日县| 三河市| 遂川县| 东平县| 临泽县| 彩票| 扎鲁特旗| 花垣县| 綦江县| 增城市| 确山县| 昌乐县| 家居| 南涧| 马山县| 东兴市| 尉氏县| 离岛区| 临泉县| 沭阳县| 漳平市| 博乐市| 来宾市| 怀来县| 噶尔县| 堆龙德庆县| 福州市| 新竹市| 上犹县| 宁都县| 苏尼特左旗| 林甸县|