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

OOM when compiling OpenCL kernel at runtime #819

Open
pranav-sivaraman opened this issue Mar 19, 2025 · 0 comments
Open

OOM when compiling OpenCL kernel at runtime #819

pranav-sivaraman opened this issue Mar 19, 2025 · 0 comments

Comments

@pranav-sivaraman
Copy link

I'm currently running the Hashcat application in benchmark mode with the Intel OpenCL runtime. One of the kernels in the benchmark is causing the application to run out of memory (OOM).

When attaching to the process with GDB, I see that there are infinite calls to malloc during the kernel compilation process.

Build the application:

curl -L https://github.com/hashcat/hashcat/archive/refs/tags/v6.2.6.tar.gz | tar xz
cd hashcat-6.2.6 && make -j32

Setup OpenCL runtime

source /nas/sw/sdev/intel/oneapi/2024/v2.1/setvars.sh

Verify that Hashcat detects the OpenCL runtime:

hashcat -I

The output should be similar to this

hashcat (v6.2.6) starting in backend information mode

SYCL CPU RT Warning: Unknown host CPU.
OpenCL Info:
============

OpenCL Platform ID #1
  Vendor..: Intel(R) Corporation
  Name....: Intel(R) OpenCL
  Version.: OpenCL 3.0 LINUX

  Backend Device ID #1
    Type...........: CPU
    Vendor.ID......: 8
    Vendor.........: Intel(R) Corporation
    Name...........: AMD EPYC 9745 128-Core Processor
    Version........: OpenCL 3.0 (Build 0)
    Processor(s)...: 512
    Clock..........: 0
    Memory.Total...: 772978 MB (limited to 193244 MB allocatable in one block)
    Memory.Free....: 386457 MB
    Local.Memory...: 256 KB
    OpenCL.Version.: OpenCL C 3.0
    Driver.Version.: 2024.18.12.0.05_160000

Run the problem benchmark
./hashcat --benchmark -m 1500

Observations:

  • The issue occurs in all Intel OpenCL runtimes from version 2023.2 up to the latest 2025.0.4.
  • The problem does not occur with the OpenCL runtime version prior to 2023.2.
  • I have been able to successfully run this kernel using the POCL runtime, so I am confident that the issue is related to the Intel OpenCL runtime.

Please let me know if any further details are needed to help diagnose the issue.
Thanks!

@pranav-sivaraman pranav-sivaraman changed the title OOM when compiling a kernel OOM when compiling OpenCL kernel at runtime Mar 19, 2025
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

No branches or pull requests

1 participant