dnouri / cuda-convnet

My fork of Alex Krizhevsky's cuda-convnet from 2013 where I added dropout, among other features.
http://code.google.com/p/cuda-convnet/
253 stars 147 forks source link

osx #14

Closed geraldstanje closed 10 years ago

geraldstanje commented 10 years ago

Hi,

have you tested it on osx with cuda 6 installed?

Thanks, Gerald

kashif commented 10 years ago

yes that is what I used.

geraldstanje commented 10 years ago

cmake will use CMakeLists.txt ?

kashif commented 10 years ago

@geraldstanje yes just type: cmake . and by default it will use CMakeLists.txt.

geraldstanje commented 10 years ago

nice. i tried to rewrite Alex's makefile, but this ended up being ugly... i guess it compiles with clang? can i use the your cmake file to compile cuda-convnet2?

kashif commented 10 years ago

yes you can certainly use these CMakeLists.txt files and modify them for cuda-convnet2. I think you might need to add support for finding OpenCV which cuda-convnet2 uses... so give it a try.

geraldstanje commented 10 years ago

ok cool. are there any other performance improvements on cuda-convnet2?

geraldstanje commented 10 years ago

thanks for info. you have been referenced here, which is a nice intro: https://www.youtube.com/watch?v=W9_SNGymRwo

2014-08-05 10:37 GMT+02:00 Kashif Rasul notifications@github.com:

yes you can certainly use these CMakeLists.txt files and modify them for cuda-convnet2. I think you might need to add support for finding OpenCV which cuda-convnet2 uses... so give it a try.

— Reply to this email directly or view it on GitHub https://github.com/dnouri/cuda-convnet/issues/14#issuecomment-51165508.

guilhermeba commented 9 years ago

Hi guys, I'm also trying to run cuda-convnet on my mac os 10.10. First I tried to install Atlas package as Alex suggest (for linux). Then, I discovery I don't need this for mac, is that correct? Now I'm trying to compile using your Cmake file. I'm getting the following errors:

A library with BLAS API found. CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: BLAS_INCLUDE_DIRS used as include directory in directory /Users/Gui/Documents/Apps/cuda-convnet-master used as include directory in directory /Users/Gui/Documents/Apps/cuda-convnet-master used as include directory in directory /Users/Gui/Documents/Apps/cuda-convnet-master/src/common used as include directory in directory /Users/Gui/Documents/Apps/cuda-convnet-master/src/nvmatrix used as include directory in directory /Users/Gui/Documents/Apps/cuda-convnet-master/src/cudaconv2

Can you help?

Thanks

kashif commented 9 years ago

@guilhermeba yes on OSX it uses the Accelerate framework. Are you on 10.10.3 and Xcode 6.3?

guilhermeba commented 9 years ago

OS is OS X 10.10 (14A389), I think it's not 10.10.3.... My Xcode is 6.3 Beta This message " A library with BLAS API found" means there is some trash from the time when I tried to install ATLAS?

kashif commented 9 years ago

Well it seems it found the Accelerate library so thats fine. The issue is the BLAS_INCLUDE_DIRS which is typically in some strange location on newer OSX... let me investigate...

guilhermeba commented 9 years ago

Thanks @kashif. Maybe it has found but it's not well installed. Did you install BLAS api in your mac?

kashif commented 9 years ago

@guilhermeba in you CmakeLists.txt file try to add the following line to HINTS:

"/Applications/Xcode-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/"

The issue is that you only seem to have Xcode-beta installed and the BLAS headers are in there... So add this location to the Cmake hints and it should find it.

guilhermeba commented 9 years ago

Wow, it worked! Thanks so much! now let's try to use... LoI

kashif commented 9 years ago

@guilhermeba nice! :+1: ok let me know if you have any other issues.

guilhermeba commented 9 years ago

hi @kashif. It seems my GPU is not supported :-(. I got this error: nvcc fatal : Unsupported gpu architecture 'compute_30' I'm using a iMac 27" with NVIDIA GeForce GT 755M. Is there any change to run on this GPU?

kashif commented 9 years ago

@guilhermeba just uncomment the appropriate line for your GPU's compute capability, which for you i guess is this?

list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)

in CMakeLists.txt and try again.

geraldstanje commented 9 years ago

hi guys, are there any image cuda-convnet classification demos like that one http://demo.caffe.berkeleyvision.org/ ?

guilhermeba commented 9 years ago

@kashif, unfortunately didn't work. I think my GPU is not supported by CUDA, see this: https://developer.nvidia.com/cuda-gpus I can't find 755M model there.

oxfordBlueDevil commented 9 years ago

@kashif I'm trying to install cuda-convnet on my mac os 10.10.2. I have XCode 6.2. I'm trying to compile using your Cmake file. I'm getting the following errors:

-- Found Threads: TRUE
-- A library with BLAS API found. -- Found PythonLibs: /usr/lib/libpython2.7.dylib (found suitable version "2.7.3", minimum required is "2.7") -- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7")

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: CUDA_COMMON_INCLUDE_DIRS used as include directory in directory /Users/michaelosorio/Desktop/zipfian/Projects/cuda-convnet used as include directory in directory /Users/michaelosorio/Desktop/zipfian/Projects/cuda-convnet used as include directory in directory /Users/michaelosorio/Desktop/zipfian/Projects/cuda-convnet/src/common used as include directory in directory /Users/michaelosorio/Desktop/zipfian/Projects/cuda-convnet/src/nvmatrix used as include directory in directory /Users/michaelosorio/Desktop/zipfian/Projects/cuda-convnet/src/cudaconv2

-- Configuring incomplete, errors occurred!

Any ideas what I'm doing wrong?

Cheers, Mike

kashif commented 9 years ago

@oxfordBlueDevil just give me a few mins. having a look now

kashif commented 9 years ago

@oxfordBlueDevil seems like it cannot find the location of the /usr/local/cuda/samples/common/inc folder. Are you sure you have installed the CUDA pkg properly? What is in your /usr/local/cuda/ folder?

oxfordBlueDevil commented 9 years ago

screenshot 2015-06-24 19 06 47

Thank you for getting back to me. No, it doesn't seem like /usr/local/cuda/samples/common/inc is within the /usr/local/cuda/ directory. Any ideas how to fix this @kashif?

Cheers, Mike

kashif commented 9 years ago

@oxfordBlueDevil try to get the package from: https://developer.nvidia.com/cuda-downloads

and make sure when you re-install, you also include to install the samples as well. I hope that helps.