not-an-aardvark/lucky-commit

how to debug why lucky_commit won't use my gpu

mat813 opened this issue · 1 comments

Hi,

I know it's not really an issue, but my employer gave me a new laptop, and I can't seem to get lucky_commit to use the gpu any more.

I think opencl works, I tried a quick test I found on https://github.com/KhronosGroup/OpenCL-Guide/blob/main/chapters/getting_started_linux.md

// C standard includes
#include <stdio.h>

// OpenCL includes
#include <CL/cl.h>

int main()
{
    cl_int CL_err = CL_SUCCESS;
    cl_uint numPlatforms = 0;

    CL_err = clGetPlatformIDs( 0, NULL, &numPlatforms );

    if (CL_err == CL_SUCCESS)
        printf("%u platform(s) found\n", numPlatforms);
    else
        printf("clGetPlatformIDs(%i)\n", CL_err);

    return 0;
}

And opencl seems to work :

$ gcc -Wall -Wextra -D CL_TARGET_OPENCL_VERSION=100 a.c -o HelloOpenCL -lOpenCL 
$ ./HelloOpenCL  
2 platform(s) found

I don't know much more about opencl so I am not sure what to check.

I know that lucky_commit does not use opencl because if I comment out the if Self::gpus_available() { in the search function in rs.c and only use the search_with_gpu, it breaks.

I'm not sure either. A lot of OpenCL stuff seems to be platform-specific, and it's fairly difficult to test without owning a lot of different types of hardware. This is the only project I've written that uses GPUs, so I don't have lot of background knowledge.

Feel free to report back if you learn anything, though.