Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

idf-demo raises "unused variable" OpenCL compiler warning on Mac #49

Closed
lkuper opened this issue Jan 28, 2015 · 3 comments
Closed

idf-demo raises "unused variable" OpenCL compiler warning on Mac #49

lkuper opened this issue Jan 28, 2015 · 3 comments
Assignees
Labels

Comments

@lkuper
Copy link
Contributor

lkuper commented Jan 28, 2015

idf-demo raises this error for me on Mac (on Linux I can't run it at all because of unrelated WebGL issues):

uncaught exception: The OpenCL compiler failed. Log was `<program source>:1:174: warning: unused variable '_sel_idx_tmp'
__kernel void RT_buildOneElement(__global int *_FAILRET, __global unsigned /* clamped */ char* RTl_aPA, int RTl_aPA__offset,__global float* retVal, int retVal__offset) {int _sel_idx_tmp; int _FAIL = 0;int _id_0 = (int)get_global_id(0);int _id_1 = (int)get_global_id(1);int _id_2 = (int)get_global_id(2);int _writeoffset = 0+1 * _id_2+4 * _id_1+1152 * _id_0;_writeoffset += retVal__offset;float  tempResult; __private int RTl_idx[3] =  { (int) _id_0, (int) _id_1, (int) _id_2};RTl_aPA = &RTl_aPA[RTl_aPA__offset];;{ tempResult = ((float)  ( RTl_aPA[0  + 1 * (RTl_idx[ 2]) + 4 * (RTl_idx[ 0]) + 1600 * (RTl_idx[ 1])]));retVal[_writeoffset] =  tempResult;if (_FAIL) {*_FAILRET = _FAIL;} return; ;}}
                                                                                                                                                                             ^
'.

Are we treating warnings as errors?

(For what it's worth, this is not the error I was getting yesterday, which was one of the OpenCL functions returning a non-zero error code. I think that it was clGetProgramBuildInfo and the error was -30, aka CL_INVALID_VALUE. But, as of today, I'm no longer able to reproduce that.)

@lkuper lkuper added the bugs label Jan 28, 2015
@lkuper lkuper added this to the Pre-PPoPP release milestone Jan 28, 2015
@lkuper lkuper assigned lkuper and unassigned jsreeram Jan 28, 2015
@lkuper
Copy link
Contributor Author

lkuper commented Jan 28, 2015

OK, this is a very strange issue. I can only duplicate it by interrupting a run of liquid-resize and then running idf-demo (I happen to be running them in the same browser tab, although I don't know if it matters). buildOneElement is a liquid-resize function name. So I guess that this warning was always happening with liquid-resize and the buildlog isn't getting cleared before idf-demo runs.

@lkuper
Copy link
Contributor Author

lkuper commented Jan 28, 2015

With the build log thing cleared up, now we just have the original issue to deal with, which is that clGetProgramBuildInfo (in compileKernel) is returning -30. Working on this...

lkuper added a commit that referenced this issue Jan 28, 2015
16K isn't enough for idf-demo, apparently.
@lkuper
Copy link
Contributor Author

lkuper commented Jan 29, 2015

OK, this seems to be working again as of a74d1b3. The issue may have been that the build log size was too small (it was 16K bytes, and one of the build logs was 20259 bytes). So we're now doing an OpenCL call to look up the size of the build log before reading it into an appropriately sized buffer.

@lkuper lkuper closed this as completed Jan 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants