MacOS OpenCL issue

Issue #24 closed
Former user created an issue

I'm using a MacBook Pro 13" mid '17 with the 3.1 GHz i5 and integrated graphics. Fractorium refuses to use OpenCL. It's supported on the CPU and GPU per https://stackoverflow.com/questions/7892955/how-can-i-test-for-opencl-compability:

$ clang -framework OpenCL cl.c -o cl
ld: warning: text-based stub file /System/Library/Frameworks//OpenCL.framework/OpenCL.tbd and library file /System/Library/Frameworks//OpenCL.framework/OpenCL are out of sync. Falling back to library file for linking.
$ ./cl 
Device Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz supports OpenCL 1.2 
Device Intel(R) Iris(TM) Graphics 650 supports OpenCL 1.2 

Here's the log:

Init()
Intel Inc. Intel(R) Iris(TM) Graphics 650
Platform: 0, device: 1, error:
failed to init log scale program


<program source>:110:48: error: call to '__fast_relax_log' is ambiguous
                        real_bucket_t logScale = (logFilter->m_K1 * log(1.0 + histogram[index].w * logFilter->m_K2)) / histogram[index].w;
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4655:22: note: expanded from macro 'log'
    #define log(__x) __fast_relax_log(__x)
                     ^~~~~~~~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4653:30: note: candidate function
    __CLFN_FD_1FD_FAST_RELAX(__fast_relax_log, native_log, __cl_log);
                             ^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:417:27: note: expanded from macro '__CLFN_FD_1FD_FAST_RELAX'
inline float __OVERLOAD__ _name(float x) { return _default_name(x); } \
                          ^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4653:30: note: candidate function
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:418:28: note: expanded from macro '__CLFN_FD_1FD_FAST_RELAX'
inline float2 __OVERLOAD__ _name(float2 x) { return _default_name(x); } \
                           ^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4653:30: note: candidate function
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:419:28: note: expanded from macro '__CLFN_FD_1FD_FAST_RELAX'
inline float3 __OVERLOAD__ _name(float3 x) { return _default_name(x); } \
                           ^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4653:30: note: candidate function
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:420:28: note: expanded from macro '__CLFN_FD_1FD_FAST_RELAX'
inline float4 __OVERLOAD__ _name(float4 x) { return _default_name(x); } \
                           ^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4653:30: note: candidate function
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:421:28: note: expanded from macro '__CLFN_FD_1FD_FAST_RELAX'
inline float8 __OVERLOAD__ _name(float8 x) { return _default_name(x); } \
                           ^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4653:30: note: candidate function
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:422:29: note: expanded from macro '__CLFN_FD_1FD_FAST_RELAX'
inline float16 __OVERLOAD__ _name(float16 x){ return _default_name(x); }
                            ^


ERROR: Program build failure in cl::Program::build().


Error initializing OpenCL renderer, using CPU renderer instead.

Here's a screen recording: https://youtu.be/UXWW6CkfxRA

Comments (6)

  1. Matt Feemster repo owner

    Ok, thanks for the log dump. That's a simple kernel compilation bug where it can't tell if the value being passed to log is a float or double. I aim to have a new release available within a month or so and I'll include a fix for this in it.

    Are you building from source at all? Or just using the installer?

    Also, I watched your video. Just for reference I do not support Intel graphics. So if it works there, good, but if not, I don't really support it because I don't have hardware to test on.

    That said, it seems you are trying to run in dual gpu mode by selecting both cards. I would advise running with only the Iris card.

    btw, does that mac not have an nvidia or amd card in it? Those are the vendors I have tested on and support.

  2. Matt Feemster repo owner

    Ok cool, the fix will be in the next release. Hopefully it won't take me too long, I only have a few more features to add before I'm done. Sit tight!

  3. Log in to comment