Chlorine
Chlorine copied to clipboard
macOS 10.14.6 Mandelbrot produces 100% blue image
Looks like compiling works, but something's broken with OpenCL. The Mandelbrot code will produce this output
CPU Time: 6.58481s
GPU Time: 0.000594s
Error: 89.5501%
for all 3 devices on platform 0 on this machine:
~/D/C/builddir ❯❯❯ ./clinfo master ca32f9a ✱ ◼
================================================================================
Platform: Apple OpenCL 1.2 (Oct 25 2019 05:16:10)
Vendor: Apple (FULL_PROFILE)
Supported Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
Available Devices:
Device: Intel Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Type: CPU (64-bit @ 2900 MHz)
Supported Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
cl_khr_fp64
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store
cl_khr_int64_base_atomics
cl_khr_int64_extended_atomics
cl_khr_3d_image_writes
cl_khr_image2d_from_buffer
cl_APPLE_fp64_basic_ops
cl_APPLE_fixed_alpha_channel_orders
cl_APPLE_biased_fixed_point_image_formats
cl_APPLE_command_queue_priority
Device: Intel Inc. Intel(R) HD Graphics 630
Type: GPU (64-bit @ 1100 MHz)
Supported Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store
cl_khr_image2d_from_buffer
cl_khr_gl_depth_images
cl_khr_depth_images
cl_khr_3d_image_writes
Device: AMD AMD Radeon Pro 560 Compute Engine
Type: GPU (32-bit @ 300 MHz)
Supported Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store
cl_khr_image2d_from_buffer
cl_khr_depth_images
cl_APPLE_command_queue_priority
cl_APPLE_command_queue_select_compute_units
cl_khr_fp64
================================================================================
When not specifying a device (0 is chosen) we see the output Compile Server Error.
When specifying device 1 we see the output No kernels or only kernel prototypes found.
When specifying device 2 we see no output but the same all blue result is produced.
Also I know that OpenCL works on this system because I've gotten the code from here to work and produce the right result.
Although my research indicates that Apple's OpenCL has bugs and Apple is not supporting OpenCL much anymore.
Hmm. I just ran this locally with a fresh clone on both my Intel i7-4980HQ
and NVIDIA GeForce GT 750M
and it output the correct image.
What compiler are you using? For reference:
$ c++ --version
Apple clang version 11.0.0 (clang-1100.0.33.16)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin