Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to translate Kernel #147

Open
PtrMan opened this issue May 7, 2019 · 3 comments
Open

Failed to translate Kernel #147

PtrMan opened this issue May 7, 2019 · 3 comments

Comments

@PtrMan
Copy link

PtrMan commented May 7, 2019

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

https://pastebin.com/Dmtj3758

@PtrMan
Copy link
Author

PtrMan commented May 8, 2019

Ah, the driver doesn't like the variable name "kernel" - so it craps out

@PtrMan
Copy link
Author

PtrMan commented May 8, 2019

Maybe this lib should add a prefix to all variable names, this way this BS can't happen

@grfrost
Copy link
Contributor

grfrost commented May 31, 2019

Sadly (but no surprisingly) kernel is a reserved word in OpenCL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants