Questions tagged [pyopencl]

PyOpenCL provides Pythonic access to the OpenCL parallel computation API.

PyOpenCL provides Pythonic access to the OpenCL parallel computation API.

342 questions
16
votes
4 answers

PyOpenCl: how to debug segmentation fault?

I have PyOpenCL code with OpenCL C kernel code. I catch segmentation fault error when I run my app. How to debug such error with some debugger or some other development tool? I don't know what exactly to do to find out the problem. I have in mind…
petRUShka
  • 9,812
  • 12
  • 61
  • 95
15
votes
2 answers

How To Structure Large OpenCL Kernels?

I have worked with OpenCL on a couple of projects, but have always written the kernel as one (sometimes rather large) function. Now I am working on a more complex project and would like to share functions across several kernels. But the examples I…
andrew cooke
  • 45,717
  • 10
  • 93
  • 143
14
votes
2 answers

Anyway to work with Keras in Mac with AMD GPU?

I have a MacBook Pro with AMD processor and I want to run Keras (Tensorflow backend) in this GPU. I came to know Keras only works with NVIDIA GPUs. What is the workaround (if possible)?
bikram
  • 7,127
  • 2
  • 51
  • 63
12
votes
4 answers

Getting started with PyOpenCL

I have recently discovered the power of GP-GPU (general purpose graphics processing unit) and want to take advantage of it to perform 'heavy' scientific and math calculations (that otherwise require big CPU clusters) on a single machine. I know that…
mariotoss
  • 414
  • 3
  • 7
  • 17
11
votes
2 answers

Download OpenCL AMD APP SDK 3.0 for windows and linux

I want to download standalone version of OpenCL AMD APP SDK 3.0 for Windows and Linux.
Tal
  • 1,145
  • 2
  • 14
  • 32
10
votes
2 answers

Optimization and speedup of a mathematical function in python

The purpose of this mathematical function is to compute a distance between two (or more) protein structures using dihedral angles: It is very useful in structural biology, for example. And I already code this function in python using numpy, but the…
NoExiT
  • 103
  • 9
10
votes
1 answer

How to use Python multiprocessing queue to access GPU (through PyOpenCL)?

I have code that takes a long time to run and so I've been investigating Python's multiprocessing library in order to speed things up. My code also has a few steps that utilize the GPU via PyOpenCL. The problem is, if I set multiple processes to run…
johnny_be
  • 299
  • 1
  • 2
  • 11
9
votes
5 answers

Python pyopencl DLL load failed even with latest drivers

I've installed the latest CUDA and driver for my GPU. I'm using Python 2.7.10 on Win7 64bit. I tried installing pyopencl from: a. the unofficial windows binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopencl b. by compiling my own after…
John Kornick
  • 301
  • 1
  • 6
  • 14
9
votes
3 answers

OpenCL - Why Use READ_ONLY or WRITE_ONLY Buffers

In OpenCL, are there any performance benefits to flagging buffers as READ_ONLY or WRITE_ONLY? This kernel is what I often see (a is READ_ONLY and b is WRITE_ONLY): __kernel void two_buffer_double(__global float* a, __global float* b) { int i =…
benshope
  • 2,936
  • 4
  • 27
  • 39
9
votes
2 answers

Pyopencl: difference between to_device and Buffer

Let import pyopencl as cl import pyopencl.array as cl_array import numpy a = numpy.random.rand(50000).astype(numpy.float32) mf = cl.mem_flags What is the difference between a_gpu = cl.Buffer(self.ctx, mf.READ_ONLY | mf.COPY_HOST_PTR,…
petRUShka
  • 9,812
  • 12
  • 61
  • 95
8
votes
1 answer

Is there an alternative to OpenCL+PyOpenCL for multiplatform GPGPU compute?

Support for OpenCL on Macs is going to end in macOS 10.15, so people invested in PyOpenCL+OpenCL as a means for doing general-purpose GPU (+CPU) compute will soon start to lose a key platform. So my questions are: Are there any viable…
Colin Stark
  • 301
  • 1
  • 10
8
votes
2 answers

How to check if GPU memory is available using PyOpenCL

I would like to know if there is a way to check how much GPU memory is available before a function uses it. I have code that often uses 1.5 GB of GPU memory or more, and if something else is using the GPU when my program wants to use it, I get a…
johnny_be
  • 299
  • 1
  • 2
  • 11
8
votes
6 answers

Python LogicError: clGetPlatformIDs failed: platform not found khr

While making nosetests for the set of Python programs in Ubuntu an error occurs: devices = [ d for d in cl.get_platforms()[0].get_devices() if LogicError: clGetPlatformIDs failed: platform not found khr File…
Irina Fateeva
  • 81
  • 1
  • 1
  • 3
7
votes
3 answers

Cannot import PyOpenCL in Juypter Notebook

I'm running inside an anacoda environment with pyopencl installed: $> conda list | grep pyopencl pyopencl 2018.2.5 py37h9888f84_0 conda-forge And from that same window I launch: $>…
mr-sk
  • 13,174
  • 11
  • 66
  • 101
7
votes
4 answers

Is it possible to write OpenCL kernels in C++ rather than C?

I understand there's an openCL C++ API, but I'm having trouble compiling my kernels... do the kernels have to be written in C? And then it's just the host code that's allowed to be written in C++? Or is there some way to write the kernels in C++…
Elliot Gorokhovsky
  • 3,610
  • 2
  • 31
  • 56
1
2 3
22 23