tdf#98515: Bail out early if kernel would have ridiculously many parameters
The Right Thing to do would be to compare the accumulated kernel parameter size against the CL_DEVICE_MAX_PARAMETER_SIZE of the device, but let's just do this sanity check for now. Bail out if the kernel would have more than 50 parameters. Calculating the accumulated kernel parameter size would be more complicated and I don't want to touch this code more than necessary. The kernel compilation will fail anyway if the size of parameters exceeds the limit and this sanity check is just to make us bail out a bit earlier. In tdf#98515 the slowness seems to indeed be caused by the OpenCL code generation , and there the number of parameters was 999, so this sanity check does fix the slow loading issue (I checked). Change-Id: Iead6dfb94ec8e7b2968ffed9423f0f9522a10ce9
Showing
Please
register
or
sign in
to comment