pyopencl

Python pyopencl Import Error

谁说我不能喝 提交于 2019-12-14 03:46:39
问题 I am using Windows 10 and getting the same error. I have AMD Radeon HD 5000 series GPU. I installed OpenCL 2.0.4.0 When I run: import pyopencl I am getting this error: ImportError Traceback (most recent call last) <ipython-input-1-63105a952239> in <module>() ----> 1 import pyopencl C:\ProgramData\Anaconda2\lib\site-packages\pyopencl\__init__.py in <module>() 32 33 try: ---> 34 import pyopencl.cffi_cl as _cl 35 except ImportError: 36 import os C:\ProgramData\Anaconda2\lib\site-packages

Download OpenCL AMD APP SDK 3.0 for windows and linux

瘦欲@ 提交于 2019-12-14 01:12:09
问题 I want to download standalone version of OpenCL AMD APP SDK 3.0 for Windows and Linux. 回答1: AMD has remove the files from their servers. There is a copy in the internet here: For Windows For Linux 回答2: Or you can use OCL SDK instead https://gpuopen.com/compute-product/opencl-sdk/ https://github.com/GPUOpen-LibrariesAndSDKs/OCL-SDK/releases 来源: https://stackoverflow.com/questions/53070673/download-opencl-amd-app-sdk-3-0-for-windows-and-linux

Creating PyOpenCl context causes later access violation

天涯浪子 提交于 2019-12-11 17:56:36
问题 I just started to experiment with OpenCL using pyopencl. I got it from here http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopencl I wrote some test programms and excecuting worked as expected. Than when I wanted to start a big batch of simulations I got random crashes with Access Violations (Windows Error Code FFFFFFFFC0000005) . It turns out that any script in which I import pyopencl and create a context crashes after one to two minute. I run 3 tests and got [63sec, 86sec, 81sec]. I have

String operations on OpenCL

感情迁移 提交于 2019-12-11 17:47:00
问题 EDIT I did some tests on the char array inputs to the kernel. I noticed a rather odd behaviour: consider the Kernel program and accompanying PyOpenCL code: #!/usr/bin/env python3 import pyopencl as cl import numpy as np import seq # Write down our kernel as a multiline string. kernel = """ __kernel void dragon( const int N, __global char *AplusB, __global char *AminusB, __global char *plusMinus, __global char *minusMinus, __global char *output ) { int idx = get_global_id(0); if (idx < N){

OpenCL kernel cannot work as expected (pyopencl)

ⅰ亾dé卋堺 提交于 2019-12-11 16:07:57
问题 I wrote an OpenCL function to increase 64-bits float point value in an array. But the results is different between CPU and GPU. import numpy as np import pyopencl as cl CL_INC = ''' __kernel void inc_f64(__global const double *a_g, __global double *res_g) { int gid = get_global_id(0); res_g[gid] = a_g[gid] + 1.0; } ''' def test(dev_type): ctx = cl.Context(dev_type=dev_type) queue = cl.CommandQueue(ctx) mf = cl.mem_flags prg = cl.Program(ctx, CL_INC).build() in_py = np.array([1.0, 2.0, 3.0, 4

PyOpenCL returns errors the first run, then only 'invalid program' errors; examples also not working

家住魔仙堡 提交于 2019-12-11 11:57:23
问题 I am trying to run an OpenCL kernel using the pyOpenCL bindings, to run on the GPU. I was trying to load the kernel to my program. I ran my program once and got an error. I ran it again without changing the code and got a different, 'invalid program' error. This keeps happening to my own programs using pyOpenCL and also on example programs. I am able to use OpenCL through the C++ bindings, on both the CPU and GPU, with no problems. So I think this is a problem specific to the pyOpenCL

pyopencl.RuntimeError: clWaitForEvents failed: exec status error for events in wait list

£可爱£侵袭症+ 提交于 2019-12-08 07:08:33
问题 Every so often I am not able to continue to run PyOpenCL on my machine. This occasionally happens if I kill a process that is using it. Across ALL pyopencl scripts/kernels, including examples I find online I get the following error: pyopencl.RuntimeError: clWaitForEvents failed: exec status error for events in wait list which follows any call of the form kernel.(queue,gs,ls,...).wait() OR a = kernel.(queue,gs,ls,...) a.wait() Rebooting my machine resolves the issue, but this is a painful work

cffi load failure when trying to import PyOpenCL

こ雲淡風輕ζ 提交于 2019-12-08 05:18:56
问题 Here's the error that I get when I try to import pyopencl: Traceback (most recent call last): File "PyOpenCLTest.py", line 6, in <module> import pyopencl as cl File "C:\Python36\lib\site-packages\pyopencl\__init__.py", line 37, in <module> import pyopencl.cffi_cl as _cl File "C:\Python36\lib\site-packages\pyopencl\cffi_cl.py", line 39, in <module> from pyopencl._cffi import ffi as _ffi ImportError: DLL load failed: The specified procedure could not be found. My OS is Windows 7 (64-bit), and I

OpenCL matrix multiplication should be faster?

徘徊边缘 提交于 2019-12-07 12:03:31
问题 I'm trying to learn how to make GPU optimalized OpenCL kernells, I took example of matrix multiplication using square tiles in local memory. However I got at best case just ~10-times speedup ( ~50 Gflops ) in comparison to numpy.dot() ( 5 Gflops , it is using BLAS). I found studies where they got speedup >200x ( >1000 Gflops ) . ftp://ftp.u-aizu.ac.jp/u-aizu/doc/Tech-Report/2012/2012-002.pdf I don't know what I'm doing wrong, or if it is just because of my GPU ( nvidia GTX 275 ). Or if it is

cffi load failure when trying to import PyOpenCL

纵饮孤独 提交于 2019-12-06 15:14:44
Here's the error that I get when I try to import pyopencl: Traceback (most recent call last): File "PyOpenCLTest.py", line 6, in <module> import pyopencl as cl File "C:\Python36\lib\site-packages\pyopencl\__init__.py", line 37, in <module> import pyopencl.cffi_cl as _cl File "C:\Python36\lib\site-packages\pyopencl\cffi_cl.py", line 39, in <module> from pyopencl._cffi import ffi as _ffi ImportError: DLL load failed: The specified procedure could not be found. My OS is Windows 7 (64-bit), and I'm currently using Python version 3.6.2. My current graphics driver (AMD Radeon HD 7800) has the