-
Notifications
You must be signed in to change notification settings - Fork 44
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
macOS support #5
Comments
-11 is CL_BUILD_PROGRAM _FAILURE There must be an unsupported extension used to build a CL module from clBuildProgram. You can get more information by digging up which file caused the error and examining more detailed error data which should indicate the line and/or failure. |
@OliverUrbann Could you describe your small changes? I am not able to build it at the moment, but I am trying to create a pull request which adds MacOS support (https://github.com/cansik/Darknet-On-OpenCL). Currently I have following problem at the end of the
|
Ok I could build it now but I have the same error for the following command:
@victorv Could you give us a hint how to check which extension is missing? Is it maybe the problem that Apple is only supporting OpenCL 1.2?
|
The error trap: 6 is a sig abort so you will need to run it with the debugger and figure out where the c++ library is aborting. |
To be honest I lost interest in the port as I noticed that macOS supports OpenCL but not for the integrated GPU (at least on my system), only for CPU. |
Debugged the executable with lldb:
|
Hi @cansik |
@ganyc717 Thank you, I tried it but it is still the same error. I think will buy an NVIDIA card together with an eGPU ;) |
Could it be a problem that we are using
Update: Nope, doesn't make a difference. |
With the newest master release (1dd549b) it is possible to run the network and load the model, but there are still errors. ./darknet detect yolov2.cfg yolov2.weights data/dog.jpg
layer filters size input output
0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BFLOPs
1 blas_kernels_1.cl build log:
<program source>:11:12: warning: comparison of integers of different signs: 'size_t' (aka 'unsignedlong') and 'int'
if(offset < size) output[global_z*size + offset] *= biases[filter];
~~~~~~ ^ ~~~~
<program source>:223:10: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int'
if(i < N) Y[OFFY+i*INCY] += ALPHA*X[OFFX+i*INCX];
~ ^ ~
<program source>:250:10: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int'
if(i < N) {
~ ^ ~
<program source>:261:10: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int'
if(i < N) X[i*INCX] += ALPHA;
~ ^ ~
<program source>:270:10: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int'
if(i < N) X[i*INCX] *= ALPHA;
~ ^ ~
<program source>:279:7: warning: comparison of integers of different signs: 'size_t' (aka 'unsignedlong') and 'int'
if(i < N) X[i*INCX] = ALPHA;
~ ^ ~
<program source>:294:10: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int'
if(i < N) Y[i*INCY] *= X[i*INCX];
~ ^ ~
max 2 x 2 / 2 416 x 416 x 32 -> 208 x 208 x 32
2 conv 64 3 x 3 / 1 208 x 208 x 32 -> 208 x 208 x 64 1.595 BFLOPs
3 max 2 x 2 / 2 208 x 208 x 64 -> 104 x 104 x 64
4 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BFLOPs
5 conv 64 1 x 1 / 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BFLOPs
6 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BFLOPs
7 max 2 x 2 / 2 104 x 104 x 128 -> 52 x 52 x 128
8 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BFLOPs
9 conv 128 1 x 1 / 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BFLOPs
10 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BFLOPs
11 max 2 x 2 / 2 52 x 52 x 256 -> 26 x 26 x 256
12 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BFLOPs
13 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BFLOPs
14 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BFLOPs
15 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BFLOPs
16 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BFLOPs
17 max 2 x 2 / 2 26 x 26 x 512 -> 13 x 13 x 512
18 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BFLOPs
19 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BFLOPs
20 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BFLOPs
21 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BFLOPs
22 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BFLOPs
23 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 3.190 BFLOPs
24 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 3.190 BFLOPs
25 route 16
26 conv 64 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 64 0.044 BFLOPs
27 reorg / 2 26 x 26 x 64 -> 13 x 13 x 256
28 route 27 24
29 conv 1024 3 x 3 / 1 13 x 13 x1280 -> 13 x 13 x1024 3.987 BFLOPs
30 conv 425 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 425 0.147 BFLOPs
31 detection
mask_scale: Using default '1.000000'
Loading weights from yolov2.weights...Done!
im2col_kernels.cl build log:
<program source>:36:18: warning: '/*' within block comment
//*data_col_ptr = data_im_ptr[ii * width + jj];
^
activation_kernels.cl build log:
<program source>:11:7: warning: no previous prototype for function 'lhtan_activate_kernel'
float lhtan_activate_kernel(float x)
^
<program source>:18:7: warning: no previous prototype for function 'lhtan_gradient_kernel'
float lhtan_gradient_kernel(float x)
^
<program source>:24:7: warning: no previous prototype for function 'hardtan_activate_kernel'
float hardtan_activate_kernel(float x)
^
<program source>:30:7: warning: no previous prototype for function 'linear_activate_kernel'
float linear_activate_kernel(float x){return x;}
^
<program source>:31:7: warning: no previous prototype for function 'logistic_activate_kernel'
float logistic_activate_kernel(float x){return 1.f/(1.f + exp(-x));}
^
<program source>:32:7: warning: no previous prototype for function 'loggy_activate_kernel'
float loggy_activate_kernel(float x){return 2.f/(1.f + exp(-x)) - 1;}
^
<program source>:33:7: warning: no previous prototype for function 'relu_activate_kernel'
float relu_activate_kernel(float x){return x*(x>0);}
^
<program source>:34:7: warning: no previous prototype for function 'elu_activate_kernel'
float elu_activate_kernel(float x){return (x >= 0)*x + (x < 0)*(exp(x)-1);}
^
<program source>:35:7: warning: no previous prototype for function 'relie_activate_kernel'
float relie_activate_kernel(float x){return (x>0) ? x : .01f*x;}
^
<program source>:36:7: warning: no previous prototype for function 'ramp_activate_kernel'
float ramp_activate_kernel(float x){return x*(x>0)+.1f*x;}
^
<program source>:37:7: warning: no previous prototype for function 'leaky_activate_kernel'
float leaky_activate_kernel(float x){return (x>0) ? x : .1f*x;}
^
<program source>:38:7: warning: no previous prototype for function 'tanh_activate_kernel'
float tanh_activate_kernel(float x){return (2.f/(1 + exp(-2*x)) - 1);}
^
<program source>:39:7: warning: no previous prototype for function 'plse_activate_kernel'
float plse_activate_kernel(float x)
^
<program source>:46:7: warning: no previous prototype for function 'stair_activate_kernel'
float stair_activate_kernel(float x)
^
<program source>:54:7: warning: no previous prototype for function 'hardtan_gradient_kernel'
float hardtan_gradient_kernel(float x)
^
<program source>:59:7: warning: no previous prototype for function 'linear_gradient_kernel'
float linear_gradient_kernel(float x){return 1;}
^
<program source>:60:7: warning: no previous prototype for function 'logistic_gradient_kernel'
float logistic_gradient_kernel(float x){return (1-x)*x;}
^
<program source>:61:7: warning: no previous prototype for function 'loggy_gradient_kernel'
float loggy_gradient_kernel(float x)
^
<program source>:67:7: warning: no previous prototype for function 'relu_gradient_kernel'
float relu_gradient_kernel(float x){return (x>0);}
^
<program source>:68:7: warning: no previous prototype for function 'elu_gradient_kernel'
float elu_gradient_kernel(float x){return (x >= 0) + (x < 0)*(x + 1);}
^
<program source>:69:7: warning: no previous prototype for function 'relie_gradient_kernel'
float relie_gradient_kernel(float x){return (x>0) ? 1 : .01f;}
^
<program source>:70:7: warning: no previous prototype for function 'ramp_gradient_kernel'
float ramp_gradient_kernel(float x){return (x>0)+.1f;}
^
<program source>:71:7: warning: no previous prototype for function 'leaky_gradient_kernel'
float leaky_gradient_kernel(float x){return (x>0) ? 1 : .1f;}
^
<program source>:72:7: warning: no previous prototype for function 'tanh_gradient_kernel'
float tanh_gradient_kernel(float x){return 1-x*x;}
^
<program source>:73:7: warning: no previous prototype for function 'plse_gradient_kernel'
float plse_gradient_kernel(float x){return (x < 0 || x > 1) ? .01f : .125f;}
^
<program source>:74:7: warning: no previous prototype for function 'stair_gradient_kernel'
float stair_gradient_kernel(float x)
^
<program source>:80:7: warning: no previous prototype for function 'activate_kernel'
float activate_kernel(float x, int a)
^
<program source>:113:7: warning: no previous prototype for function 'gradient_kernel'
float gradient_kernel(float x, int a)
^
opencl execution error, code -11 -11
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: OpenCL error, code: -11
Abort trap: 6 |
I made some small changes to the code and now it compiles on macOS High Sierra. However, running seems to be a problem. Executing:
build/darknet_cl detector demo cfg/coco.data cfg/yolo.cfg yolo.weights
leads to:
Demo layer filters size input output 0 conv 32 3 x 3 / 1 608 x 608 x 3 -> 608 x 608 x 32 1 opencl execution error, code -11 -11 libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: OpenCL error, code: -11
I'm not an expert for OpenCL and maybe someone has an idea before I spend a lot of time investigating this.
The text was updated successfully, but these errors were encountered: