[Mesa-dev] [RFC] clover: Attempt to make clover fail when a kernel fails to build

Bruno Jimenez brunojimen at gmail.com
Thu May 15 03:55:07 PDT 2014


Hi,

I'm trying to make clover fail in the case that a kernel fails to build.
My first attempt has been to track a llvm compile failure up from
'radeon_llvm_compile' (at radeon/radeon_llvm_emit.c), through
'r600_llvm_compile' (at r600/r600_llvm.c) and through
'evergreen_launch_grid' (at r600/evergreen_compute.c), then detect the
failure when launching a kernel and throw an error.

The attached patch is based on this, and it kind of works, as for the
first kernel that fails to compile it will return the corresponding
error (CL_INVALID_PROGRAM_EXECUTABLE), but for the following kernels it
crashes completely.

I think that this is not how we should detect compile errors, nor where
we should. Because, after reading the OpenCL 1.1 spec, I think that they
should be handled at 'clBuildProgram'.

The spec for OpenCL 1.1 says about 'clBuildProgram':
'builds (compiles & links) a program executable [...]'
And there's an error for build failures:
'CL_BUILD_PROGRAM_FAILURE if there is a failure to build the program
executable'

Any thoughts about this?
Bruno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-exit-if-llvm_compile-fails.patch
Type: text/x-patch
Size: 7872 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140515/56fcd822/attachment.bin>


More information about the mesa-dev mailing list