2

I've been trying to instal ROCm but when running command rocminfo I get this outcome:

libkmod: ERROR ../libkmod/libkmod-module.c:1657 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
ROCk module is NOT loaded, possibly no GPU devices

And when running command clinfo command after installing it, I get this outcome, with 0 devices:

Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.2 AMD-APP (3361.0)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback
  Platform Host timer resolution                  100ns
  Platform Extensions function suffix             AMD

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  AMD Accelerated Parallel Processing
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   AMD Accelerated Parallel Processing
  clCreateContext(NULL, ...) [default]            No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No devices found in platform

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1
        NOTE:   your OpenCL library only supports OpenCL 2.1,
                but some installed platforms support OpenCL 2.2.
                Programs using 2.2 features may crash
                or behave unexepectedly

I'm working on a Windows device with Ubuntu 18.04 LTS. Kernel version 5.5.0. And I have AMD Radeon Vega 8 Graphics. The installation of ROCm was made as follows: I downloaded Kernel 5.5

wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb
 
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb
 
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-image-unsigned-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb
 
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb


 sudo dpkg -i linux-headers-5.0.0*.deb linux-image-unsigned-5.0.0*.deb linux-modules-5.0.0*.deb

I rebooted the system and then downloaded and installed amdgpu-install:

$ sudo apt-get update

$ wget https://repo.radeon.com/amdgpu-install/21.40/ubuntu/bionic/amdgpu-install-21.40.40500-1_all.deb

$ sudo apt-get install ./amdgpu-install-21.40.40500-1_all.deb

$ sudo apt-get update

$ sudo amdgpu-install --usecase=opencl,rocm --no-dkms

Rebooted one more time. And added myself to the video group:

sudo usermod -a -G video $LOGNAME

I didn't get any error messages until running clinfo and rocminfo. Can somebody tell me what am I doing wrong? P.D: I'm trying to get ROCm OpenCl to use my GPU with GROMACS

0

1 Answer 1

1

Update: I don't believe ROCm is necessary (or will work) under WSL2. Please see this U&L answer for details. The info below is unlikely to be useful if you are trying to use GPU Compute under WSL2 on an AMD GPU.


While I don't have any AMD GPU systems with which to try this out (nor do I know for sure if ROCm works on WSL2), I see a few problems with your configuration.

First, you just say "Windows device", but not which Windows version, which is very important as a prerequisite here. For GPU Compute support in WSL2, you'll need either Windows 10 or the absolute latest release of Windows 10 (21H2, just released in the last few days). See this Microsoft devblog for some more information there. The focus seems to be on CUDA, but AMD also worked closely with Microsoft on this.

Second, check your actual kernel version with uname -a. I don't recall 5.5 ever being a WSL2 kernel release. According to the Microsoft docs, GPU Compute support was added in the 4.19.121 release of the WSL2 kernel. After that, there was a 5.4 release, and now we're on 5.10 as the latest WSL2 kernel.

And it's unlikely that the mainline Ubuntu kernel will help you anyway here. The ability for the Linux kernel to communicate with the Windows AMD device driver for GPU compute is a feature specific (as far as I know) to the Microsoft WSL2-fork of the kernel.

Finally, the stock WSL2 kernel doesn't support loadable modules. Since it sounds like ROCm installs as a module, you'll need to:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .