teflon
Goto Top

Kali Linux - NVIDIA Cuda Funtionaltät GeForce MX150

Hallo,

auf einem HP spectre X360 möchte ich CUDA Funktionalitäten mit einer NVIDIA GeForce MX150 nutzen und bekomme es irgendwie nicht hin.
Nach Informationen auf en.wikipedia.org/wiki/CUDA sollte dies funktionieren.

Orientiert habe ich mich an folgendem Howto 1 .
Habe dies angepasst auf die aktuelle Version.

Folgende Informationen zum System:

## uname -m && cat /etc/*release
x86_64
DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2019.1"
VERSION_ID="2019.1"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"

## dmesg | grep nvidia
[ 2.689539] nvidia: loading out-of-tree module taints kernel.
[ 2.689548] nvidia: module license 'NVIDIA' taints kernel.
[ 2.703546] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[ 2.704103] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[ 2.719070] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 390.87 Tue Aug 21 16:16:14 PDT 2018
[ 2.748836] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 2.749599] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[ 4787.826834] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 237

## lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)
01:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX150] (rev a1)


## nvidia-smi

Sun Mar 3 13:56:33 2019
| NVIDIA-SMI 390.87 Driver Version: 390.87 |

| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |

| 0 GeForce MX150 Off | 00000000:01:00.0 Off | N/A |
| N/A 37C P0 N/A / N/A | 0MiB / 2002MiB | 0% Default |


| Processes: GPU Memory |
| GPU PID Type Process name Usage |

| No running processes found |


## nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Tue_Jun_12_23:07:04_CDT_2018
Cuda compilation tools, release 9.2, V9.2.148


Nun zum eigentlichen Problem. Beim setup bekomme ich folgende Fehlermeldung.
## python setup.py clean build install
running clean
Removing temporary files and pre-built GPU-kernels...
running build
running build_ext
Compiling CUDA module using nvcc 9.2, V9.2.148...
Executing '/usr/lib/nvidia-cuda-toolkit/bin/nvcc -m64 -ccbin clang-7.0-47 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'
clang-7.0-47: No such file or directory
Traceback (most recent call last):
File "setup.py", line 166, in <module>
setup(**setup_args)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 91, in run
subprocess.check_call(nvcc_cmd, shell=True)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/usr/lib/nvidia-cuda-toolkit/bin/nvcc -m64 -ccbin clang-7.0-47 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu' returned non-zero exit status 1


Es ist mir nicht klar was gesucht wird und was ich möglicher Weise vergessen habe.
Für einen Hinweis, Tipp oder eine Idee wäre ich dankbar.

Gruß
Teflon

Content-Key: 424756

Url: https://administrator.de/contentid/424756

Printed on: April 25, 2024 at 04:04 o'clock

Member: Xolger
Xolger Mar 04, 2019 at 13:25:45 (UTC)
Goto Top
Hallo Teflon,

bei
 /usr/lib/nvidia-cuda-toolkit/bin/nvcc -m64 -ccbin clang-7.0-47 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu  
wird der Ausdruck
clang-7.0-47
als Dateiname interpretiert, und diese Datei ist nicht vorhanden.
Sollte es ein Parameter sein fehlt wahrscheinlich ein Bindestrich, sollte es eine Datei sein, dann am besten den kompletten Pfad angeben.


Gruß
Xolger
Member: teflon
teflon Mar 05, 2019 at 21:28:26 (UTC)
Goto Top
Hallo Xolger,

erst einmal besten Dank für die Information. Mit deinem Hinweis kam ich auf die Idee mal mit
  1. /usr/lib/nvidia-cuda-toolkit/bin/nvcc --help nachzuschauen um was es geht.
...
--compiler-bindir <path> (-ccbin)
Specify the directory in which the host compiler executable resides. The
host compiler executable name can be also specified to ensure that the correct
host compiler is selected. In addition, driver prefix options ('--input-drive-prefix',
'--dependency-drive-prefix', or '--drive-prefix') may need to be specified,
if nvcc is executed in a Cygwin shell or a MinGW shell on Windows.
...

Damit ist klar das es ein Parameter ist.
Nun habe die Zeile wie folgt geändert und die Fehlermeldung sieht anders aus. face-wink

Executing '/usr/lib/nvidia-cuda-toolkit/bin/nvcc -m64 -ccbin /usr/lib/llvm-6.0/bin/clang -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'
nvcc fatal : The version ('6.0') of the host compiler ('clang') is not supported


So nun ist die Frage welche Version wird benötigt? Hier komme ich heute abend aber nicht mehr weiter.
Bis zum 10.03. werde ich auch sehr wenig Zeit haben. 8-( Könnte also etwas dauern. Sollte jemand hier einen Tipp haben, so bin ich natürlich dankbar.
Sollte ich selbst etwas finden, werde ich dies hier vermelden.

Danke!
Gruß
Teflon