当我运行Python脚本时,出现错误:
LogicError:clGetPlatformIDs失败:
我安装了anaconda和conda-forge软件包pyopencl。
LogicError Traceback (most recent call last)
/home/inat/Git/xrt/tests/raycing/info_opencl.py in <module>()
2
3 print('\n' + '=' * 60 + '\nOpenCL Platforms and Devices')
----> 4 for platform in cl.get_platforms(): # Print each platform on this computer
5 print('=' * 60)
6 print('Platform - Name: ' + platform.name)
/home/inat/APP/anaconda3/lib/python3.5/site-packages/pyopencl/cffi_cl.py in get_platforms()
661 def get_platforms():
662 platforms = _CArray(_ffi.new('clobj_t**'))
--> 663 _handle_error(_lib.get_platforms(platforms.ptr, platforms.size))
664 return [Platform._create(platforms.ptr[0][i])
665 for i in range(platforms.size[0])]
/home/inat/APP/anaconda3/lib/python3.5/site-packages/pyopencl/cffi_cl.py in _handle_error(error)
623 _lib.free_pointer(error.msg)
624 _lib.free_pointer(error)
--> 625 raise e
626
627 # }}}
LogicError: clGetPlatformIDs failed: <unknown error -1001>