schwittlick / ofxDarknet

darknet neural network addon for openFrameworks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cudnn support

genekogan opened this issue · comments

darknet supports optional cudnn support, which tends to help conserve memory. i usually get out of memory errors upon instantiating the network unless almost everything is closed except the app, and i imagine others get the same, so it might be a good idea for us to use it. but i think the dylib is compiled without it at the moment. you can see that there are #ifdef CUDNN blocks in convolutional_layer.c and network.c, possibly others. might be a good idea to see how compiling with cudnn affects performance.

That's worth a try, as I can't use it at all, due to only having 1GB of memory

I just gave it a try, in Windows and was running into some problems when trying to load the weights, at runtime that I didn't know how to resolve, yet. Some CUBLAS_STATUS_NOT_INITIALIZED error.

Though it was loading the cfg file and constructing the network architecture accordingly. It was using CUDNN, but it was still using the same amount of RAM on the gpu (about 780mb). Maybe CUDNN doesn't do a good job here.