Fedora 38 + AMD RX 7900 XT
#1
Hi,

I've got two devices;
GPU: AMD Radeon RX 7900 XT (Navi 31)
CPU+GPU: AMD Ryzen 9 7950X

On https://hashcat.net/hashcat/ it says "AMD GPUs on Linux require "AMDGPU" (21.50 or later) and "ROCm" (5.0 or later)". However, I'm unable to get it working with amdgpu 23.0.0 (xorg-x11-drv-amdgpu-23.0.0-1.fc38.x86_64) and rocm 5.5.0 (rocm-opencl-5.5.0-1.fc38.src.rpm) on Fedora 38.

If I go without the rocm-opencl package and with these packages installed:
Code:
$ rpm -qa | grep -iE '(amd|rocm|mesa|opencl)'
mesa-filesystem-23.0.3-3.fc38.x86_64
mesa-filesystem-23.0.3-3.fc38.i686
amd-gpu-firmware-20230404-149.fc38.noarch
opencl-headers-3.0-14.20230201git4c82e9c.fc38.noarch
opencl-filesystem-1.0-17.fc38.noarch
mesa-libglapi-23.0.3-3.fc38.x86_64
mesa-vulkan-drivers-23.0.3-3.fc38.x86_64
mesa-libOSMesa-23.0.3-3.fc38.x86_64
mesa-va-drivers-23.0.3-3.fc38.x86_64
mesa-dri-drivers-23.0.3-3.fc38.x86_64
mesa-libgbm-23.0.3-3.fc38.x86_64
mesa-libEGL-23.0.3-3.fc38.x86_64
mesa-libGL-23.0.3-3.fc38.x86_64
mesa-libGLU-9.0.1-8.fc38.x86_64
mesa-libxatracker-23.0.3-3.fc38.x86_64
mesa-libEGL-devel-23.0.3-3.fc38.x86_64
mesa-libGLU-devel-9.0.1-8.fc38.x86_64
mesa-libGL-devel-23.0.3-3.fc38.x86_64
rocm-clinfo-5.5.0-1.fc38.x86_64
rocm-comgr-16.1-2.fc38.x86_64
mesa-vulkan-drivers-23.0.3-3.fc38.i686
mesa-va-drivers-23.0.3-3.fc38.i686
mesa-libglapi-23.0.3-3.fc38.i686
mesa-dri-drivers-23.0.3-3.fc38.i686
mesa-libGL-23.0.3-3.fc38.i686
mesa-libgbm-23.0.3-3.fc38.i686
mesa-libEGL-23.0.3-3.fc38.i686
mesa-libOSMesa-23.0.3-3.fc38.i686
xorg-x11-drv-amdgpu-23.0.0-1.fc38.x86_64
rocm-comgr-devel-16.1-2.fc38.x86_64
rocm-device-libs-16.1-1.fc38.x86_64
rocm-smi-4.0.0-8.fc38.noarch
hsakmt-1.0.6-29.rocm5.5.0.fc38.x86_64
rocm-runtime-5.5.0-1.fc38.x86_64
rocminfo-5.5.0-1.fc38.x86_64
hsakmt-devel-1.0.6-29.rocm5.5.0.fc38.x86_64
rocm-runtime-devel-5.5.0-1.fc38.x86_64

Obviously only my CPU is detected:
Code:
$ hashcat -I
hashcat (v6.2.6-532-g939a97d14) starting in backend information mode
OpenCL Info:
============
OpenCL Platform ID #1
  Vendor..: The pocl project
  Name....: Portable Computing Language
  Version.: OpenCL 3.0 PoCL 3.1  Linux, Release, RELOC, SPIR, LLVM 16.0.0, SLEEF, FP16, DISTRO, POCL_DEBUG
  Backend Device ID #1
    Type...........: CPU
    Vendor.ID......: 1
    Vendor.........: AuthenticAMD
    Name...........: pthread-AMD Ryzen 9 7950X 16-Core Processor
    Version........: OpenCL 3.0 PoCL HSTR: pthread-x86_64-redhat-linux-gnu-znver4
    Processor(s)...: 32
    Clock..........: 5879
    Memory.Total...: 61372 MB (limited to 8192 MB allocatable in one block)
    Memory.Free....: 30654 MB
    Local.Memory...: 1024 KB
    OpenCL.Version.: OpenCL C 1.2 PoCL
    Driver.Version.: 3.1

When installing this rocm-opencl package:
Code:
$ dnf info rocm-opencl
Repository teams is listed more than once in the configuration


Installed Packages
Name        : rocm-opencl
Version      : 5.5.0
Release      : 1.fc38
Architecture : x86_64
Size        : 1.7 M
Source      : rocm-opencl-5.5.0-1.fc38.src.rpm
Repository  : @System
From repo    : updates
Summary      : ROCm OpenCL Runtime
URL          : https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime
License      : MIT
Description  : ROCm OpenCL language runtime.
            : Supports offline and in-process/in-memory compilation.

I get the following liste of devices (take note of "CL_OUT_OF_HOST_MEMORY"):
Code:
$ hashcat -I
hashcat (v6.2.6-532-g939a97d14) starting in backend information mode
clCreateCommandQueue(): CL_OUT_OF_HOST_MEMORY
clCreateCommandQueue(): CL_OUT_OF_HOST_MEMORY
OpenCL Info:
============
OpenCL Platform ID #1
  Vendor..: Advanced Micro Devices, Inc.
  Name....: AMD Accelerated Parallel Processing
  Version.: OpenCL 2.1 AMD-APP (3558.0)
  Backend Device ID #1
    Type...........: GPU
    Vendor.ID......: 1
    Vendor.........: Advanced Micro Devices, Inc.
    Name...........: AMD Radeon Graphics
    Version........: OpenCL 2.0
    Processor(s)...: 48
    Clock..........: 2482
    Memory.Total...: 24560 MB (limited to 20876 MB allocatable in one block)
    Memory.Free....: 0 MB
    Local.Memory...: 64 KB
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 3558.0 (HSA1.1,LC)
    PCI.Addr.BDF...: 03:00.0
  Backend Device ID #2
    Type...........: GPU
    Vendor.ID......: 1
    Vendor.........: Advanced Micro Devices, Inc.
    Name...........: AMD Radeon Graphics
    Version........: OpenCL 2.0
    Processor(s)...: 1
    Clock..........: 2200
    Memory.Total...: 512 MB (limited to 435 MB allocatable in one block)
    Memory.Free....: 0 MB
    Local.Memory...: 64 KB
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 3558.0 (HSA1.1,LC)
    PCI.Addr.BDF...: 12:00.0
OpenCL Platform ID #2
  Vendor..: The pocl project
  Name....: Portable Computing Language
  Version.: OpenCL 3.0 PoCL 3.1  Linux, Release, RELOC, SPIR, LLVM 16.0.0, SLEEF, FP16, DISTRO, POCL_DEBUG
  Backend Device ID #3
    Type...........: CPU
    Vendor.ID......: 1
    Vendor.........: AuthenticAMD
    Name...........: pthread-AMD Ryzen 9 7950X 16-Core Processor
    Version........: OpenCL 3.0 PoCL HSTR: pthread-x86_64-redhat-linux-gnu-znver4
    Processor(s)...: 32
    Clock..........: 5879
    Memory.Total...: 61372 MB (limited to 8192 MB allocatable in one block)
    Memory.Free....: 30654 MB
    Local.Memory...: 1024 KB
    OpenCL.Version.: OpenCL C 1.2 PoCL
    Driver.Version.: 3.1

When testing with "hashcat -b -m 0" it's failing with "clCreateCommandQueue(): CL_OUT_OF_HOST_MEMORY" and "No devices found/left."

If I then remove "rocm-opencl" and install mesa-libOpenCL instead, and run benchmark with --force I get this:
Code:
$ hashcat -b -m 0 --force
hashcat (v6.2.6-532-g939a97d14) starting in benchmark mode
Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.
You have enabled --force to bypass dangerous warnings and errors!
This can hide serious problems and should only be done when debugging.
Do not report hashcat issues encountered when using --force.
OpenCL API (OpenCL 1.1 Mesa 23.0.3) - Platform #1 [Mesa]
========================================================
* Device #1: AMD Radeon Graphics (gfx1100, LLVM 16.0.1, DRM 3.49, 6.2.15-300.fc38.x86_64), 24448/24576 MB (6144 MB allocatable), 96MCU
* Device #2: AMD Radeon Graphics (gfx1036, LLVM 16.0.1, DRM 3.49, 6.2.15-300.fc38.x86_64), 31616/31710 MB (7927 MB allocatable), 2MCU
OpenCL API (OpenCL 3.0 PoCL 3.1  Linux, Release, RELOC, SPIR, LLVM 16.0.0, SLEEF, FP16, DISTRO, POCL_DEBUG) - Platform #2 [The pocl project]
============================================================================================================================================
* Device #3: pthread-AMD Ryzen 9 7950X 16-Core Processor, skipped
Benchmark relevant options:
===========================
* --force
* --backend-devices-virtual=1
* --optimized-kernel-enable
-------------------
* Hash-Mode 0 (MD5)
-------------------
clCompileProgram(): CL_COMPILE_PROGRAM_FAILURE
fatal error: cannot open file '/usr/lib64/clc/gfx1100-amdgcn-mesa-mesa3d.bc': No such file or directory
* Device #1: Kernel /usr/local/share/hashcat/OpenCL/shared.cl build failed.

Any ideas on what to try out next?
Reply


Messages In This Thread
Fedora 38 + AMD RX 7900 XT - by idarlund - 05-18-2023, 11:06 PM
RE: Fedora 38 + AMD RX 7900 XT - by idarlund - 05-20-2023, 11:13 PM
RE: Fedora 38 + AMD RX 7900 XT - by idarlund - 08-24-2023, 12:16 PM