Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Resolved] ROCm + OpenCL + Hashcat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pulsar_
n00b
n00b


Joined: 11 Aug 2015
Posts: 8

PostPosted: Mon Jun 17, 2019 6:24 pm    Post subject: [Resolved] ROCm + OpenCL + Hashcat Reply with quote

Hi,

I'm trying to run Hashcat with OpenCL on Radeon RX 580

What I've done so far:

I first rebuilt mesa with OpenCL use flag, but quickly realized this is not compatible with Hashcat.

Installed rocm-meta, rocm-opencl-runtime, rocm-opencl-driver, rocm-sources, along with their dependencies from justxi's overlay (https://github.com/justxi/rocm):

Code:
$ eix -c rocm\|roct
[I] dev-libs/rocm-cmake [1] (9999@06/10/2019): ROCm-CMake
[I] dev-libs/rocm-opencl-driver [1] (2.2.0@06/11/2019): ROCm-OpenCL-Driver
[I] dev-libs/rocm-opencl-runtime [1] (2.5.0@06/10/2019): ROCm-OpenCL-Runtime
[I] dev-libs/roct-thunk-interface (2.5.0(0/2.5)[1]@06/10/2019): Radeon Open Compute Thunk Interface
[U] dev-util/rocm-smi [1] (2.5.0@06/16/2019 -> (~)9999): ROCm System Management Interface
[I] dev-util/rocminfo [1] (9999@06/12/2019): ROCm Application for Reporting System Info
[I] sys-devel/amd-rocm-meta [1] (2.5.0(2.4)@06/11/2019): Meta package for ROCm
[I] sys-kernel/rocm-sources [1] (2.5.9999(2.5)@06/11/2019): ROCm kernel sources


What I can't get working:

After booting into the new kernel and setting
Code:
eselect opencl
to roc

Code:
$ hashcat -I
hashcat (v5.1.0) starting...

Mesa (Gallium) OpenCL platform detected!

The Mesa platform can cause errors that are often mistaken for bugs in hashcat.
You are STRONGLY encouraged to use the drivers listed in docs/readme.txt.
You can use --force to override this, but do not report related errors.
You can also use --opencl-platforms to skip the Mesa platform(s).


It tells me I'm running mesa, but I continue anyways:

Code:
$ hashcat -I --force
hashcat (v5.1.0) starting...

OpenCL Info:

Platform ID #1
  Vendor  : Mesa
  Name    : Clover
  Version : OpenCL 1.1 Mesa 19.1.0

  Device ID #1
    Type           : GPU
    Vendor ID      : 1
    Vendor         : AMD
    Name           : Radeon RX 580 Series (POLARIS10, DRM 3.32.0, 5.0.0-rc1+, LLVM 7.1.0)
    Version        : OpenCL 1.1 Mesa 19.1.0
    Processor(s)   : 36
    Clock          : 1365
    Memory         : 6553/26214 MB allocatable
    OpenCL Version : OpenCL C 1.1
    Driver Version : 19.1.0


rocm-smi and clinfo:

Code:
$ sudo /opt/rocm/bin/rocm-smi

========================ROCm System Management Interface========================
================================================================================
GPU  Temp   AvgPwr  SCLK     MCLK     Fan     Perf  PwrCap  VRAM%  GPU% 
0    54.0c  44.08W  1257Mhz  2000Mhz  32.94%  auto  145.0W   14%   0%   
================================================================================
==============================End of ROCm SMI Log ==============================

$ clinfo -l
Platform #0: AMD Accelerated Parallel Processing
 `-- Device #0: gfx803
Platform #1: Clover
 `-- Device #0: Radeon RX 580 Series (POLARIS10, DRM 3.32.0, 5.0.0-rc1+, LLVM 7.1.0)


Shouldn't Hashcat see ROC for OpenCL processing at this point?

Thanks!

~~~~~~~~~~

Looks like this is a problem with hashcat-5.1.0, which as of now is the latest in portage

When I build and run the latest hashcat from git:

Code:
$ ./hashcat -I
hashcat (v5.1.0-1152-g62d5d2df) starting...

OpenCL Info:
============

OpenCL Platform ID #1
  Vendor..: Advanced Micro Devices, Inc.
  Name....: AMD Accelerated Parallel Processing
  Version.: OpenCL 2.0 AMD-APP.internal.dbg (2901.0)

  Backend Device ID #1
    Type...........: GPU
    Vendor.ID......: 1
    Vendor.........: Advanced Micro Devices, Inc.
    Name...........: gfx803
    Version........: OpenCL 1.2
    Processor(s)...: 36
    Clock..........: 1365
    Memory.........: 6963/8192 MB allocatable
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 2901.0 (HSA1.1,LC)

OpenCL Platform ID #2
  Vendor..: Mesa
  Name....: Clover
  Version.: OpenCL 1.1 Mesa 19.1.0

  Backend Device ID #2
    Type...........: GPU
    Vendor.ID......: 1
    Vendor.........: AMD
    Name...........: Radeon RX 580 Series (POLARIS10, DRM 3.32.0, 5.0.0-rc1+, LLVM 7.1.0)
    Version........: OpenCL 1.1 Mesa 19.1.0
    Processor(s)...: 36
    Clock..........: 1365
    Memory.........: 6553/26214 MB allocatable
    OpenCL.Version.: OpenCL C 1.1
    Driver.Version.: 19.1.0


If anyone else has this problem, check out:
https://github.com/hashcat/hashcat/issues/1295
https://github.com/hashcat/hashcat

~~~~~~~~~~
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum