Skip to content

Fix OpenCL compilation on newer AMD drivers - #4

Open
dimaniojk wants to merge 2 commits into
AveryanAlex:masterfrom
dimaniojk:master
Open

Fix OpenCL compilation on newer AMD drivers#4
dimaniojk wants to merge 2 commits into
AveryanAlex:masterfrom
dimaniojk:master

Conversation

@dimaniojk

Copy link
Copy Markdown
## Summary

Fixes OpenCL kernel compilation on newer AMD ROCm/OpenCL compilers,
including RDNA 4 `gfx1200`.

## Problem

The kernel passes pointers to entire arrays:

```c
sha512_hash(&key, &hash);

Newer AMD OpenCL compilers reject this because the function expects
pointers to uchar, not pointers to array types.

The build fails with errors similar to:

error: incompatible pointer types passing '__private uchar (*)[32]'
to parameter of type 'const __private uchar *'

error: incompatible pointer types passing '__private uchar (*)[64]'
to parameter of type '__private uchar *'

Fix

Pass the arrays directly:

sha512_hash(key, hash);

Arrays decay to the required element pointers when passed to the function.

Tested on

  • NixOS
  • AMD ROCm OpenCL
  • AMD RDNA 4 / gfx1200
  • Rust release build
  • Approximately 15.5–15.8 MH/s

After this change, the OpenCL kernel compiles and runs successfully.

A generated private key was also verified with Yggdrasil 0.5.13 and
reproduced the expected vanity IPv6 address.

dimaniojk and others added 2 commits July 20, 2026 06:26
Added fork notes including compatibility fixes for AMD GPUs and details on changes made to the OpenCL kernel.
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.

1 participant