Theano on Mac with Radeon

Created on 19 Mar 2017  Â·  8Comments  Â·  Source: Theano/Theano

Built the dev version of Theano and the same with libgpuarray.
Mac OSX, Sierra, Python 3.6, Virtualenv (local builds via setup.py for Theano and LibGpuArray)
GPU: AMD Radeon M370X
Here is the problem:

import theano
[CL_INVALID_WORK_GROUP_SIZE] : OpenCL Error : clEnqueueNDRangeKernel failed: local_size[1] = 8 must be less than the device max work items size[1] = 1
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "/Users/nick/project/p3/Theano/theano/gpuarray/__init__.py", line 164, in
use(config.device)
File "/Users/nick/project/p3/Theano/theano/gpuarray/__init__.py", line 151, in use
init_dev(device)
File "/Users/nick/project/p3/Theano/theano/gpuarray/__init__.py", line 100, in init_dev
pygpu.blas.gemm(0, tmp, tmp, 0, tmp, overwrite_c=True)
File "pygpu/blas.pyx", line 129, in pygpu.blas.gemm (pygpu/blas.c:3354)
File "pygpu/blas.pyx", line 44, in pygpu.blas.pygpu_blas_rgemm (pygpu/blas.c:2011)
pygpu.gpuarray.GpuArrayException: (b'(clblas) error in blas call, no details for now.', 11)

OpenCL

Most helpful comment

Re-built PyOpenCL for both versions of Python (2.7 and 3.6) and it started to work with the only discrete card (AMD Radeon R9 M370X Compute Engine), and it began to work on both Pythons. On CPU/Integrated card fails(0:0, 0:1).

Running of PyOpenCL examples helped with this. For my MacBook, the discrete card is in index 2 in the list.
SO, for me - the working command line example is:

THEANO_FLAGS=device=opencl0:2 python gpu.py

All 8 comments

OpenCL support is experimental, and we do not have the resources to support it for now.

I see, I will try to investigate,
Thanks

Re-built PyOpenCL for both versions of Python (2.7 and 3.6) and it started to work with the only discrete card (AMD Radeon R9 M370X Compute Engine), and it began to work on both Pythons. On CPU/Integrated card fails(0:0, 0:1).

Running of PyOpenCL examples helped with this. For my MacBook, the discrete card is in index 2 in the list.
SO, for me - the working command line example is:

THEANO_FLAGS=device=opencl0:2 python gpu.py

What versions of PyOpenCL and LibGPUArray are you using?

Hello, @nph19

Sorry, it is hard to restore what versions I had more than a year ago. So, i think it is better to close this issue.

Theano didn't support OpenCL in a usable form. We do not plan to finish
that feature due to:

https://groups.google.com/forum/#!msg/theano-users/7Poq8BZutbY/rNCIfvAEAwAJ

On Mon, Oct 8, 2018 at 6:20 PM Dmytro Nikolayev notifications@github.com
wrote:

Closed #5733 https://github.com/Theano/Theano/issues/5733.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Theano/Theano/issues/5733#event-1891420305, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALC-xczJ3nRTAEklNiczNntcsY4c7eaks5ui8_BgaJpZM4Mh3f3
.

You shouldnt close the OpenCL issue, you should let it open for an eventual community effort.
Deep learning will never become mainstream if it can only run on 5% of the world hardware (Nvidia)...

There are others issue about OpenCL.

Le jeu. 11 oct. 2018 13:25, LifeIsStrange notifications@github.com a
écrit :

You shouldnt close the OpenCL issue, you should let it open for an
eventual community effort.
Deep learning will never become mainstream if it can only run on 5% of the
world hardware (Nvidia)...

—
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/Theano/Theano/issues/5733#issuecomment-429044480, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALC-_wc7MB6AIU6E1ItYOvMDLqkPrGeks5uj37zgaJpZM4Mh3f3
.

Was this page helpful?
0 / 5 - 0 ratings