Page MenuHome

Fix for strict OpenCL compilers which need a pragma set for half float support

Authored by Alex Fuller (mistaed) on Sep 1 2018, 6:15 AM.




I am trying to run Blender Cycles on an AMD GPU but using the ROCm OpenCL implementation on an AMD Vega Frontier Edition under linux (ROCm 1.8.3) and found that the pragma to enable cl_khr_fp16 isn't being set for the kernel so it fails to compile.

This patch is an attempt to fix this, but it hasn't been tested as I'm having issues compiling Blender 2.80 from scratch (usually I just compile the standalone Cycles but it's really out of date). I'm not sure if this is the right spot to put in the flag as well, probably not.


Diff Detail

rB Blender

Event Timeline

Just an update, I managed to build the latest Blender 2.80 here (I had /usr/bin/c++ & cc set to clang not gcc, doh!)

This patch successfully compiles Cycles experimental kernel on ROCm 1.8.3's OpenCL implementation, however I'm still investigating other matters on why it isn't working still with the ROCm developers...


This revision is now accepted and ready to land.Sep 3 2018, 12:16 PM
This revision was automatically updated to reflect the committed changes.