Python pyopencl Import Error

2019-06-28 03:52发布

问题:

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\pyopencl\cffi_cl.py in <module>()
     37 from pytools import memoize_method
     38 
---> 39 from pyopencl._cffi import ffi as _ffi
     40 from .compyte.array import f_contiguous_strides, c_contiguous_strides
     41 

ImportError: DLL load failed: The specified procedure could not be found.

回答1:

I found answer to my question. After I install Intel SDK for OpenCL Applications 2016, errors are disappeared. I think now when I run my code it is using intel video cord not my dedicated ATI card. I dont know how to check which one is running.