Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
cutil_inline.h

The original great cuda-convnet package is here: http://code.google.com/p/cuda-convnet/

To build the convnet using CUDA 5:

  1. Change the build.sh to use correct pathes. For cuda SDK path, use the path contains file helper_cuda.h.
  2. Make a dummyinclude folder, and put the cutil_inline.h into that folder.
  3. For MAKEFILE, include the dummyinclude file.

Try ./build.sh and see whether that can compiles.

The functionality is not fully tested and this can just compiles the package.

/*
Dummy Includes for cutil_inline.h
Wei LI <kuantkid <at> gmail <dot> com>
*/
#include <helper_cuda.h>
#define cutilCheckMsg(a) getLastCudaError(a)
#define cutGetMaxGflopsDeviceId() gpuGetMaxGflopsDeviceId()
#define MIN(a,b) (a) < (b) ? (a) : (b)
# Change the include line in Makefile
INCLUDES := -DCUDA_5 -I$(PYTHON_INCLUDE_PATH) -I$(NUMPY_INCLUDE_PATH) -I$(CUDA_SDK_PATH) -I./include -I./include/common -I./include/cudaconv2 -I./include/nvmatrix -I./dummyinclude/

skosch commented Dec 18, 2012

This is awesome, thank you! I also had to comment out line 332 in common-gcc-cuda-4.0.mk to stop it from linking to cutil and shrutil. That made it compile; I don't know if it actually works yet.

Owner

weilinear commented Jan 17, 2013

There is some further comments in email from David Reichert and hope this will benefit others:

Thanks a lot! It looks like you also added this to the Makefile 
-LGLEW

as well as commented out the lines below makedirectories, which is what caused me trouble
(I don't really know how makefiles work in detail). Maybe these details could be added to
your explanation. Also, I also had to comment out those cutil lines to make it work. It does
seem to work now though, so thanks!

In addition to this I also followed instructions from here to modify common-gcc-cuda-4.0.mk

Thank you very much!

benselby commented Apr 2, 2014

This is great, but can anyone verify that it is in fact functional? I am unable to recreate the sample specified here: https://code.google.com/p/cuda-convnet/wiki/TrainingNet with no error output...

did you get it installed with cuda 6 on osx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment