FAST-Pathology: OpenCL exception on Mac


Not sure if it is an issue with FASTPathology or a problem with the installation of openCL, but I have a user that got these error message after following all the installation steps on Mac OS: image

And the terminal shows:

	ERROR [0x7000030d5000] Build log, device 0
	<program source>:13:3: error: expected expression
	        } else {
	ERROR [0x7000030d5000] Program build failure
	stopping pipeline
	removing renderers..
	stopping pipeline
	removing renderers..

Is there any way to check if OpenCL is installed properly on MacOS?

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 34 (20 by maintainers)

Most upvoted comments

@andreped Could you test if this was the cause for crashes on AMD Mac’s as well?

Works wonders on both AMD GPU and dedicated Intel GPU now, @smistad :] Great job, and good catch, @cavenel!

Scale bar is also working fine!

Screenshot 2023-09-04 at 12 56 15

Yes, brew is very annyoing; suddenly updating packages, and then not supporting installation of older versions. But, the plan is to package all the dependencies on macOS to avoid having to use brew at all. This is what we do on windows and ubuntu, and it is on my todo list for macOS.

Unfortunately, libomp 16.0.6 seems to be the only available version in brew for arm64. But it is unrelated to this specific issue here, so we can probably move to #73!

Yes, I will compile it for arm64 as well, but I have to do it manually still since github doesn’t offer arm64 macOS runners yet

Yes I can confirm in now works out-of-the-box with version 1.1.2! Thanks for the fast fix! Will you also add the arm64 asset?

Doh! 🤦

I added a fix for it to FAST just now: Will rebuild FastPathology with the fix soon.

Thanks for figuring this out @cavenel

@andreped Could you test if this was the cause for crashes on AMD Mac’s as well?

Once fixing the missing new line in, I didn’t get any other compilation errors. I tested a couple of pipelines, and they worked well. But I am not sure they actually ran the kernel. Would you have a minimal pipeline example running erosion?

(Edit: I see you wrote that TissueSegmentation uses, but I had no issue with it. So probably means it’s only in for some reason.)


OpenCL is installed correctly, apple has their own implementation which is always installed. The error comes from apple’s opencl failing to compile some OpenCL code. Since other opencl implementations are able to compile this, it points to a bug in apple’s code (not the first time…).

I think it fails to compile

Also I think this is the same issue we have seen on AMD Macs.

This can probably be resolved by rewriting the code it fails on. You can try editing the file yourself. It will try to recompile every time you run it. To fix it myself I need access to a Mac with this issue.

Unfortunately I am also out for the weekend with no access to the Mac computer. Will test on Monday! Thanks again

Thanks for spending some time on this! It also fails on CMU-1.svs directly loaded from fastpathology. The last output was indeed with verbose on.