Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22270

install cuda for pytorch cudatoolkit=10.2 on fedora32 with nvidia optimus system

$
0
0

I have recently switched to fed32 on my ThinkPad E470 with optimus system (see [1])and I am trying to get pytorch cudatoolkit10.2 to work.However, I am struggling with the instruction given in [2] both for the cuda and nvidia installation. In fact I was trying to install nvidia using:

sudo dnf install akmod-nvidiasudo dnf install xorg-x11-drv-nvidia-cuda

after a reboot I installed cuda using the suggested commands in [2]:

sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/fedora29/x86_64/cuda-fedora29.reposudo dnf clean allsudo dnf install cuda

After that I installed pytorch with cudatoolkit using the conda command:

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

If I start python in the same environment and import torch, cuda.is_available() returns false.

After I have tried to compile a cuda program using /usr/local/cuda/bin/nvcc, I found out that cuda struggles with fed32 gcc10.0.1 and complains that it needs gcc8.This was also pointed out in [2], but with

dnf copr enable kwizart/cuda-gcc-10.1 -ydnf install cuda-gcc cuda-gcc-c++ -yexport HOST_COMPILER=cuda-g++

compiling with nvcc returned that it was missing some other library (and furthermore torch.cuda.is_available() returned false).

I am very new to fedora and linux and I am afraid to go any further, since I hesitate to install extra shared libraries in my root without exact knowledge of what I am doing.Can anybody give a detailed instruction on how I can proceed?

Thanks a lot in advance!

References

[1]

  /sbin/lspci | grep -e 3D   01:00.0 3D controller: NVIDIA   Corporation GM108M [GeForce 940MX] (rev a2)

[2] https://rpmfusion.org/Howto/NVIDIA


Viewing all articles
Browse latest Browse all 22270

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>