ganyc717 / Darknet-On-OpenCL

Darknet On OpenCL
MIT License
100 stars 44 forks source link

macOS on M1: running make command generates 46 warnings and 9 errors #27

Closed mkarzhaubayeva closed 3 years ago

mkarzhaubayeva commented 3 years ago

Hey all! Hope you can help me to solve my issues. Basically, when I'm running make, here are the warnings that are generated:

/Users/User-PC/Darknet-On-OpenCL/darknet_cl/src/blas_kernels_cl.cpp:1161:96: warning: implicit conversion of NULL constant to 'cl_uint' (aka 'unsigned int') [-Wnull-conversion] cl_int status = clEnqueueNDRangeKernel(*cl->queue, kernel, 3, NULL, global_size, NULL, **NULL**, NULL, &e);

(it refers to the bolded NULL) they are all the same, but happen on different lines throughout the code and here are the errors:

/Users/User-PC/Darknet-On-OpenCL/darknet_cl/src/blas_kernels_cl.cpp:333:27: error: non-constant-expression cannot be narrowed from type 'int' to 'size_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing] size_t global_size[] = { filters,BLOCK };

(it refers to filters) that also are repeating. Do you have any clue what's wrong and how to solve it? Thanks!

mkarzhaubayeva commented 3 years ago

Solved

mhash1m commented 3 years ago

@mkarzhaubayeva hi, can you please explain the process of how you installed darknet on m1? Did you do it natively?

mkarzhaubayeva commented 3 years ago

@mHash1m hello, I've installed pjreddie's and AlexeyAB's versions of darknet by cloning them from git, like in here. I don't use the OpenCL version of it because it just doesn't work. But Darknet on OpenCV does work.

mhash1m commented 3 years ago

@mkarzhaubayeva alright, does it let you utilise GPU? and does it run native? The site you linked says it only has GPU support compiling with cuda

mkarzhaubayeva commented 3 years ago

@mHash1m no, it doesn't. It runs natively, everything works okay. I use OpenCV for compilation (because I can't use Cuda since I don't have an Intel processor) - it's mentioned therein on that website. If you want to use GPU - the only way for mac on m1 is via Google Colab, online virtually.

mhash1m commented 3 years ago

I see.. training on just the CPU is very slow :disappointed:, I tried. No darknet, I can't spare the expected 3,500 hours to train my custom model :sweat_smile: . Colab also doesn't let you train big models. Anyway, thanks for the help :+1:

mkarzhaubayeva commented 3 years ago

@mHash1m welcome, good luck!