Diablo-D3/DiabloMiner

Worksize and OS X

Closed this issue · 4 comments

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).

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.

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

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

Gotcha.