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

"Error CL_BUILD_PROGRAM_FAILURE when calling clBuildProgram." using rocm with RX vega64's #2649

Open
bdunford opened this issue Jan 7, 2020 · 2 comments

Comments

@bdunford
Copy link

bdunford commented Jan 7, 2020

Attempting to mine Haven and eventually RYO having issues on Ubuntu 18.04 using Rocm I have tried all the following ROCM versions with the same results.
3.0.6
2.9.6
1.9.307

Using the pre-built Linux binary yields the same results.

Thanks for all that you do.

xmr-stak output is below.
Version: xmr-stak 2.10.8 67cf951

[2020-01-07 19:50:29] : Mining coin: cryptonight_haven
[2020-01-07 19:50:31] : Found AMD platform index id = 0, name = Advanced Micro Devices, Inc.
[2020-01-07 19:50:31] : Found OpenCL GPU gfx900.
[2020-01-07 19:50:31] : Found OpenCL GPU gfx900.
[2020-01-07 19:50:31] : Found OpenCL GPU gfx900.
[2020-01-07 19:50:31] : Found OpenCL GPU gfx900.
[2020-01-07 19:50:31] : Found OpenCL GPU gfx900.
[2020-01-07 19:50:31] : AMD: GPU (OpenCL) configuration stored in file 'amd.txt'
[2020-01-07 19:50:31] : Compiling code and initializing GPUs. This will take a while...
[2020-01-07 19:50:31] : Device 0 work size 8 / 16.
[2020-01-07 19:50:31] : OpenCL device 0 - Precompiled code /home/user/.openclcache/696bac971ef6870bf9551e51639d6b8f7eeb2545e5f79c110cf67f4abb10b2c4.openclbin not found. Compiling ...
[2020-01-07 19:50:31] : Error CL_BUILD_PROGRAM_FAILURE when calling clBuildProgram.
Build log:
/tmp/comgr-b17a90/input/CompileSource:1940:16: error: passing 'ulong *' (aka 'unsigned long *') to parameter of type 'ulong *' (aka 'unsigned long *') changes address space of pointer
keccakf1600_1(st);
^~
/tmp/comgr-b17a90/input/CompileSource:331:33: note: passing argument to parameter 'st' here
inline void keccakf1600_1(ulong st[25])
^
1 error generated.
Error: Failed to compile opencl source (from CL or HIP source to LLVM IR).

@psychocrypt
Copy link
Collaborator

psychocrypt commented Jan 7, 2020 via email

@bdunford
Copy link
Author

bdunford commented Jan 7, 2020

I got it working by changing
xmrstak/backend/amd/amd_gpu/opencl/cryptonight.cl:131

inline void keccakf1600_1(ulong st[25])
to
inline void keccakf1600_1(ulong *st)

Not sure what negative impacts it might cause elsewhere though. I believe that it was because rocm was using opencl 2.0 per this
https://software.intel.com/en-us/articles/the-generic-address-space-in-opencl-20

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

2 participants