Press "Enter" to skip to content

Tag: cuda

Hackintosh Logs: Lazy Steps & Picking-Ups

Q1: What’s wrooong with you recently?

Well, I’ve been wondering what desktop environment can meet all of my following three requirements:

  1. Programming Friendly;
  2. UI & UE Friendly;
  3. Budget Friendly.

“Do you want to train a LSTM structured prediction task while having some tea with the soup on the other screen?”

“Yes, I do. And I may have to switch to another desktop to debug if the program crashes…”

So, Let’s run a survey to narrow down the choices. Basically because I’m so lazy that I don’t know how to properly tune OS like Solaris, IBM-AIX or even Chrome OS, I believe the CUDA official website has helped me boiled them down to three alternatives: Windows, Linux and macOS.

So, from the perspective of a lazy person, I choose macOS because the CUDA related configuration is the easiest (you’ll see below) with the first two requirements met comfortably. But in fact I can’t afford a Mac Pro… and what’s more, the latest Mac Pro or other Macs use AMD graphic cards (yes, AMD…).

What about a PC with a macOS installed? That’s called a hackintosh and I guess that fits all the three requirements!

multiple experiences
multiple experiences on a Hackintosh

Q2: Is it even practical to configure a hackintosh?

Continue reading Hackintosh Logs: Lazy Steps & Picking-Ups

Theano: Playing with GPU on Ubuntu 16.04

It’s been several days since the release of Ubuntu 16.04, and since I’ve bought a new graphic card, I think it’s necessary to have some fun with it. Obviously I underestimated the difficulty of adapting the Keras with a Theano backend on the new system. It took me a day to figure out what went wrong and searching for any solution, for I am so green on the practical mechanism behind the library (I only know how to use it).

Generally, the problem I met is like:

ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 1, 'for cmd', 'nvcc -shared -O3 -m64 -Xcompiler -DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden -Xlinker -rpath,/home/joseph/.theano/compiledir_Linux-4.4--generic-x86_64-with-Ubuntu-16.04-xenial-x86_64-2.7.11+-64/cuda_ndarray -I/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/theano/gof -o /home/joseph/.theano/compiledir_Linux-4.4--generic-x86_64-with-Ubuntu-16.04-xenial-x86_64-2.7.11+-64/cuda_ndarray/cuda_ndarray.so mod.cu -L/usr/lib -lcublas -lpython2.7 -lcudart')
WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available  (error: cuda unavailable)

when I launched theano on some tasks with GPU enabled and specified.

If you are in a hurry, click here to jump directly to the solution.

Continue reading Theano: Playing with GPU on Ubuntu 16.04