-
Notifications
You must be signed in to change notification settings - Fork 2.3k
OpenCL fails on Mesa and R9 280X #59
Comments
Fyi, you can use three backticks to do code blocks. See https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code |
I'm getting this error too for my Gigabyte R9 280X 3GB Rev 2 on Ubuntu 17.04. |
Hmmn, I've compiled this with
Using Ubuntu Server 16.04 with an HD 7950 running Oibaf drivers. |
I ended up downgrading my Ubuntu 17.04 to 16.04 so that I can install the amdgpu-pro driver. It did not install on 17.04. After that I don't have this OpenCL 1.1 issue anymore, because the amdgpu-pro driver comes with OpenCL 1.2 support. That's another thing I have 50% MH/s than it is supposed to be. Gotta fine tune my settings I guess. |
@papaiatis Do you have a link to the driver you used? I didn't think amdgpu-pro supported the 280X? I'm trying to get this working with a HD 7950 (very similar to 280X) and the amdgpu-pro drivers gave me the error |
I have 280X and I'm using OpenCL 1.2 (old fglrx-core headless driver for Ubunut 16.04). |
@lukechilds I followed these steps: http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%E2%80%93Release-Notes.aspx |
@chfast are you able to send a link to where I could find those drivers? I was under the impression fglrx was completely incompatible with 16.04 due to the version of X.Org it uses. @papaiatis Thanks, that's what I tried previously. |
Yes, because AMD has fucked you in (select a body part you want) and dropped official OpenCL support for you card on Linux. amdgpu-pro driver does not support chips of GCN 1.0 nor GCN 1.1. Even if you installed it, it did not mean the Linux kernel was using it. |
@chfast thanks so much for the link, it's working. Are you able to set the clock speeds of your card using that driver? Apologies for hijacking this issue btw, happy to take this conversation elsewhere if you'd prefer. |
Is there any reason the actual fix of this bug has not been committed yet? diff --git a/libethash-cl/ethash_cl_miner_kernel.cl b/libethash-cl/ethash_cl_miner_kernel.cl
index a3e190034..74681f52c 100644
--- a/libethash-cl/ethash_cl_miner_kernel.cl
+++ b/libethash-cl/ethash_cl_miner_kernel.cl
@@ -60,6 +60,10 @@ __constant uint2 const Keccak_f1600_RC[24] = {
(uint2)(0x80008008, 0x80000000),
};
+#ifdef cl_clang_storage_class_specifiers
+#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable
+#endif
+
#if PLATFORM == OPENCL_PLATFORM_NVIDIA && COMPUTE >= 35
static uint2 ROL2(const uint2 a, const int offset) {
uint2 result;
See for example: ethereum/libethereum@86d472a And the proper spec: https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/storageQualifiers.html |
OpenCL version 1.1 does not support storage-class qualifiers and hence does not work with current version of Mesa/clover. The extension cl_clang_storage_class_specifiers allows the usage of storage-class qualifiers with Mesa/clover. Fixes ethereum-mining#59
@EoD That fix is needed too but it doesn't affect the actual issue we're all having here. This issue is about running ethminer on Mesa and getting |
@Djhg2000 Maybe your version of Mesa is too old? Ethminer works fine for me in benchmark mode with the above patch. I am using current Mesa 17.2-git. The only issue I ran into was |
OpenCL version 1.1 does not support storage-class qualifiers and hence does not work with current version of Mesa/clover. The extension cl_clang_storage_class_specifiers allows the usage of storage-class qualifiers with Mesa/clover. Fixes ethereum-mining#59
@smasher816 No, I missed this commit. I rebase my branch on top of the current master and added some code to let Clover work again. |
@EoD According the Debian package version it seems like I have Mesa 13.0.6-1+b2. Please note that Mesa 17 was preceded by Mesa 13 (14-16 was skipped), so it's not that old. |
@Djhg2000 Just a guess, but can you try using kernel 4.11+ and enabling amdgpu for GCN1.0? |
@EoD I seem to have forgotten to mention it in the thread, but I'm already running Linux 4.11.6 compiled with AMDGPU support for SI and CIK. The issue happens with both |
@Alpherie @Djhg2000 Are you sure, you are not running into a libclc bug (or missing feature)? Random guess |
Update default work sizes
Let's start with OpenCL 1.1 support.
OpenCL 1.1 doesn't actually support the 'static' storage class specifier and so running ethminer on Mesa results is a bunch of
input.cl:114:1: error: OpenCL version 1.1 does not support the 'static' storage class specifier
obviously with different line numbers. To fix that I used the solution from cpp-ethereum issue #3020 , where @lvella cleverly figured out you could enable the specifier anyway by prepending
#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable
at the top of
/libethash-cl/ethash_cl_miner_kernel.cl
which still works with the latest git of ethminer.
With that out of the way, the issue I'm facing now is that I'm instead getting
[OPENCL]:<unknown>:0:0: in function ethash_calculate_dag_item void (i32, %union.compute_hash_share addrspace(1)*, %union.compute_hash_share addrspace(1)*, i32): unsupported initializer for address space
I have no clue what this means since I don't know more than incredibly basic OpenCL. Grepping the source tree reveals this line:
./libethash-cl/ethash_cl_miner_kernel.cl:386:__kernel void ethash_calculate_dag_item(uint start, __global hash64_t const* g_light, __global hash64_t * g_dag, uint isolate)
which I, again, have no clue what it actually does. I presume the solution to this one isn't as simple as adding a
#pragma
directive.How do I proceed from here?
Sample benchmark run, including Ctrl+C at the end where the program simply stopped for several minutes:
ethminer/build$ ./ethminer/ethminer -G -M
[OPENCL]:Found suitable OpenCL device [AMD TAHITI (DRM 2.48.0 / 4.9.0-3-amd64, LLVM 3.9.1)] with 3221225472 bytes of GPU memory
Benchmarking on platform: CL
Preparing DAG for block #0
Warming up...
ℹ 03:06:46|openclminer0 set work; seed: #00000000, target: #000000000000
ℹ 03:06:46|openclminer0 Initialising miner...
[OPENCL]:Using platform: Clover
[OPENCL]:Using device: AMD TAHITI (DRM 2.48.0 / 4.9.0-3-amd64, LLVM 3.9.1)(OpenCL 1.1 Mesa 13.0.6)
[OPENCL]:<unknown>:0:0: in function ethash_calculate_dag_item void (i32, %union.compute_hash_share addrspace(1)*, %union.compute_hash_share addrspace(1)*, i32): unsupported initializer for address space
[OPENCL]:clEnqueueWriteBuffer(-38)
Trial 1... 0
Trial 2... 0
Trial 3... 0
Trial 4... 0
Trial 5... 0
^C
ethminer/build$
Edit: Sorry, there's no simple way to prevent GitHub from butchering the formatting in the last code block.
The text was updated successfully, but these errors were encountered: