Diablo-D3 / DiabloMiner

OpenCL miner for Bitcoin
https://bitcointalk.org/index.php?topic=1721.0
GNU General Public License v3.0
535 stars 217 forks source link

Worksize and OS X #68

Closed elmigranto closed 9 years ago

elmigranto commented 11 years ago

When assembling defines for CL compiler, following code is used for determining correct value of WORKSIZE define:

if(LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX)
    compileOptions += " -D WORKSIZE=64";
else
    compileOptions += " -D WORKSIZE=" + deviceWorkSize;

However, when obtaining CL_DEVICE_MAX_WORK_GROUP_SIZE no analogous action is taken:

long deviceWorkSize = device.getInfoSize(CL10.CL_DEVICE_MAX_WORK_GROUP_SIZE);

I can't figure out how is WORKSIZE define relates to deviceWorkSize and how define is used in OpenCL code for sure, but something disturbs me about this situation… I'd like someone to clarify whether things are ok this way. IMHO this is related to #48 and similar issues (caused by wrong output of CL_DEVICE_MAX_WORK_GROUP_SIZE query on OS X), which could be avoided by forcing deviceWorkSize = 64 on OS X (with respect to forceWorkSize of course).

Diablo-D3 commented 11 years ago

I think you're right and thats incorrect. However, it won't fix the problem that OSX says one max size and requires another, and the error you found was supposed to be the fix for that. I'll fix that in a second.

Diablo-D3 commented 9 years ago

Not that anyone GPU mines anymore, but did OSX ever end up fixing their OpenCL implementation?

elmigranto commented 9 years ago

I have no idea, abandoned my project some time ago, unclosed issue popped up on 3rd-party website and bothered me :)

Diablo-D3 commented 9 years ago

Gotcha.