Nengo OpenCL backend for nengo 2.2

Hi! Really enjoying starting to work with Nengo (2.2.0). As soon as I started playing with convolution (and moderately sized images), things really slowed to a crawl so I decided to try and install the OpenCL backend. Everything went smoothly, nengo_ocl v1.0.0 was installed with pip and I’m able to import nengo_ocl. However, when I try and swap in nengo_ocl.Simulator(my_network) for nengo.Simulator(my_network) I get a

ValueError: This simulator only supports Nengo 2.1.x (got 2.2.0)

Am I missing anything obvious here, or does the accelerated backend not support 2.2.0 yet?


Hi Spencer, welcome to the forum!

Currently Nengo OCL doesn’t support 2.2.0 yet. For the time being, you can roll back to an earlier version of Nengo by doing pip install nengo==2.1.2; it’s very likely that your model will run without a problem in 2.1.2, so that will get you up and running the quickest.

We’re planning to do a new release of Nengo OCL this upcoming week which will support 2.2.0 (and 2.3.0, which we’ll release at the same time). One of the changes in that release will be to make OCL less conservative about what Nengo versions it supports. Right now, if Nengo OCL detects a future version that it hasn’t explicitly tested with, it will raise the error you’re getting. In the new release, we change this error to a warning and try to simulate it anyway, which will work in the vast majority of cases.

When we do the releases next week, we’ll post about them in the announcement category!

Great, thanks Trevor. I’ll keep an eye out for it!

Also, the development version of nengo_ocl works with Nengo 2.2.0, so another option is to install nengo_ocl from source.