Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hip rtc windows env implementation & LLVMBitcode compilation fix #3946

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mostwanted002
Copy link
Contributor

@mostwanted002 mostwanted002 commented Feb 9, 2024

Since the release of HIP SDK on Windows, the HIP SDK installer provided by AMD sets the ENV variable "HIP_PATH" on Windows.

That can be used to parse the latest release version which can be used to load the latest HIP RTC DLL for the HIP backend to work.

This also fixes a bug that was due to the presence of -nocudalib under HIP RTC compile options, resulting in a kernel compilation error.
More details here

@Shazgul
Copy link

Shazgul commented Feb 11, 2024

Getting Error: ADL_Adapter_AdapterInfo_Get(): -3

@matrix
Copy link
Member

matrix commented Feb 11, 2024

"Removed -nocudalib from hiprtc_options to fix LLVMBitcode compilation ..." is working on my side.

@jsteube something related to this issue? #3501

@mostwanted002
Copy link
Contributor Author

@Shazgul what GPU and what driver version?

@Shazgul
Copy link

Shazgul commented Feb 16, 2024

@Shazgul what GPU and what driver version?

Driver Version: 24.1.1 | ROCm Version: 5.7.1

GPU: 16GB XFX Radeon RX 7800 XT Qick 319

OS: Windows 11

@mostwanted002
Copy link
Contributor Author

@Shazgul what GPU and what driver version?

Driver Version: 24.1.1 | ROCm Version: 5.7.1

GPU: 16GB XFX Radeon RX 7800 XT Qick 319

OS: Windows 11

Can you please provide the commands that you executed and their output? Meanwhile I'll get it checked on similar hardware and see if I'm able to reproduce this behavior.

@mostwanted002
Copy link
Contributor Author

I tested it on driver version 24.1.1, ROCm HIP SDK version 5.7.1, and Windows 11 with an RX 7900 XTX. The issue didn't occur there.
image

Still looking for a 7800 XT to test it with

@Shazgul
Copy link

Shazgul commented Feb 17, 2024

Is it maybe because of broken MSYS DLLs?

@mostwanted002
Copy link
Contributor Author

I'll have to compile on MSYS and see. I cross-compiled on Linux.

@Shazgul
Copy link

Shazgul commented Feb 17, 2024

I'll have to compile on MSYS and see. I cross-compiled on Linux.

I didn't compiled myself at all, i loaded your compiled Version via. Actions 🤔 ... Maybe that's the Problem, idk?

@mostwanted002
Copy link
Contributor Author

@Shazgul were you using "Windows (Static)" or "Windows (Shared)" build?

@Shazgul
Copy link

Shazgul commented Feb 17, 2024

@Shazgul were you using "Windows (Static)" or "Windows (Shared)" build?

Used the Static one, should i maybe try the Shared one?

@mostwanted002
Copy link
Contributor Author

Yea, neither of the builds from artifacts is working. I'd advise you to download and compile it, or install MSYS for the static build.

@Shazgul
Copy link

Shazgul commented Feb 17, 2024

Build Hashcat with MSYS2, now....

`Username@DESKTOP UCRT64 ~/hashcat
$ ./hashcat.exe -I
hashcat (v6.2.6-848-gc1a10518f) starting in backend information mode

hiprtcCompileProgram is missing from HIPRTC shared library.

Support for HIPRTC was dropped by AMD Adrenalin Edition 22.7.1 and later.
This is not a hashcat problem.

Please install the AMD HIP SDK`

:(

@mostwanted002
Copy link
Contributor Author

Okay, I was able to reproduce the error on compilation via MSYS2.
But I do need to check if it existed in previous versions as well or not.

The binary cross compiled with mingw64 from linux works as expected but the binaries compiled using MSYS2 have following errors in backend mode:

hashcat (v6.2.6-850-g992f1c13b) starting in backend information mode

The device #3 specifically listed was skipped because it is an alias of device #1

The device #4 specifically listed was skipped because it is an alias of device #2

<inline asm>:1:2: error: instruction not supported on this GPU
        V_ADD_U32     v0, vcc, 0, 0;
        ^
<inline asm>:1:2: error: instruction not supported on this GPU
        V_ADDC_U32    v0, vcc, 0, 0, vcc;
        ^
<inline asm>:1:2: error: operands are not valid for this GPU or mode
        V_ADD_CO_U32  v0, vcc, 0, 0;
        ^
<inline asm>:1:2: error: instruction not supported on this GPU
        V_ADDC_CO_U32 v0, vcc, 0, 0, vcc;
        ^
<inline asm>:1:2: error: instruction not supported on this GPU
        V_SUB_U32     v0, vcc, 0, 0;
        ^
<inline asm>:1:2: error: instruction not supported on this GPU
        V_SUBB_U32    v0, vcc, 0, 0, vcc;
        ^
<inline asm>:1:2: error: operands are not valid for this GPU or mode
        V_SUB_CO_U32  v0, vcc, 0, 0;
        ^
<inline asm>:1:2: error: instruction not supported on this GPU
        V_SUBB_CO_U32 v0, vcc, 0, 0, vcc;
        ^
HIP Info:
=========

HIP.Version.: 5.7.32000

Backend Device ID #1 (Alias: #3)
  Name...........: AMD Radeon RX 6900 XT
  Processor(s)...: 40
  Clock..........: 2400
  Memory.Total...: 16368 MB
  Memory.Free....: 16240 MB
  Local.Memory...: 64 KB
  PCI.Addr.BDFe..: 0000:0f:00.0

Backend Device ID #2 (Alias: #4)
  Name...........: AMD Radeon RX 6900 XT
  Processor(s)...: 40
  Clock..........: 2255
  Memory.Total...: 16368 MB
  Memory.Free....: 16240 MB
  Local.Memory...: 64 KB
  PCI.Addr.BDFe..: 0000:12:00.0

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

OpenCL Platform ID #1
  Vendor..: Advanced Micro Devices, Inc.
  Name....: AMD Accelerated Parallel Processing
  Version.: OpenCL 2.1 AMD-APP (3608.0)

  Backend Device ID #3 (Alias: #1)
    Type...........: GPU
    Vendor.ID......: 1
    Vendor.........: Advanced Micro Devices, Inc.
    Name...........: AMD Radeon RX 6900 XT
    Version........: OpenCL 2.0 AMD-APP (3608.0)
    Processor(s)...: 40
    Clock..........: 2400
    Memory.Total...: 16368 MB (limited to 13912 MB allocatable in one block)
    Memory.Free....: 16256 MB
    Local.Memory...: 64 KB
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 3608.0 (PAL,LC)
    PCI.Addr.BDF...: 0f:00.0

  Backend Device ID #4 (Alias: #2)
    Type...........: GPU
    Vendor.ID......: 1
    Vendor.........: Advanced Micro Devices, Inc.
    Name...........: AMD Radeon RX 6900 XT
    Version........: OpenCL 2.0 AMD-APP (3608.0)
    Processor(s)...: 40
    Clock..........: 2255
    Memory.Total...: 16368 MB (limited to 13912 MB allocatable in one block)
    Memory.Free....: 16256 MB
    Local.Memory...: 64 KB
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 3608.0 (PAL,LC)
    PCI.Addr.BDF...: 12:00.0

And under benchmark mode:

hashcat (v6.2.6-850-g992f1c13b) 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.

The device #3 specifically listed was skipped because it is an alias of device #1

The device #4 specifically listed was skipped because it is an alias of device #2

ADL_Adapter_AdapterInfo_Get(): -3

Started: Sun Feb 18 12:43:26 2024
Stopped: Sun Feb 18 12:43:26 2024

@Shazgul
Copy link

Shazgul commented Feb 22, 2024

Any news so far :D ?

@mostwanted002
Copy link
Contributor Author

Nothing so far, since this looks like MSYS2 compilation issue. It's giving these errors on other branches as well.

@misakillers
Copy link

misakillers commented Apr 15, 2024

Support for HIPRTC was dropped by AMD Adrenalin Edition 22.7.1 and later.
This is not a hashcat problem.
Please install the AMD HIP SDK

I also have the same problem, maybe it's because it doesn't support my graphics card driver (R7 5700U version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants