Failed to translate Kernel
PtrMan opened this issue · 3 comments
PtrMan commented
Either the kernel is written in a wrong way or this lib is bugged.
It prints these(and more) errors to the console
clBuildProgram failed
************************************************
C:\Users\R0B3\AppData\Local\Temp\\OCL21676T0.cl:11:20: error: expected member name or ';' after declaration specifiers
__global float *kernel;
~~~~~~~~~~~~~~ ^
C:\Users\R0B3\AppData\Local\Temp\\OCL21676T0.cl:11:20: error: expected ';' at end of declaration list
__global float *kernel;
^
;
C:\Users\R0B3\AppData\Local\Temp\\OCL21676T0.cl:20:156: error: expected ')'
double org_opennars_applications_cv_Conv__conv4( __global int* imgArr, int imgWidth, int imgHeight, int kernelCenterX, int kernelCenterY, __global float* kernel, int kernelSize){
^
C:\Users\R0B3\AppData\Local\Temp\\OCL21676T0.cl:20:48: note: to match this '('
double org_opennars_applications_cv_Conv__conv4( __global int* imgArr, int imgWidth, int imgHeight, int kernelCenterX, int kernelCenterY, __global float* kernel, int kernelSize){
^
C:\Users\R0B3\AppData\Local\Temp\\OCL21676T0.cl:20:156: error: parameter name omitted
double org_opennars_applications_cv_Conv__conv4( __global int* imgArr, int imgWidth, int imgHeight, int kernelCenterX, int kernelCenterY, __global float* kernel, int kernelSize){
^
C:\Users\R0B3\AppData\Local\Temp\\OCL21676T0.cl:22:19: error: use of undeclared identifier 'kernelSize'
for (int dy = -kernelSize / 2; dy<(kernelSize / 2); dy++){
^
when compiling
PtrMan commented
Ah, the driver doesn't like the variable name "kernel" - so it craps out
PtrMan commented
Maybe this lib should add a prefix to all variable names, this way this BS can't happen
grfrost commented
Sadly (but no surprisingly) kernel is a reserved word in OpenCL