我试图让PyOpenCL在运行Mac OS X Lion的iMac上运行NumPy 1.5.1和Python 2.6.0。我首先使用easy_install安装了PyOpenCL,然后我尝试了如何解释它:http://wiki.tiker.net/PyOpenCL/Installation/Mac
当我运行演示脚本(http://documen.tician.de/pyopencl/#)时,它会显示OpenCL设备(Intel Core i3和ATI Radeon HD5670),但当我选择其中一个时,两者都打印0.0
Choose device(s):
[0] <pyopencl.Device 'Intel(R) Core(TM) i3 CPU 550 @ 3.20GHz' on 'Apple' at 0xffffffff>
[1] <pyopencl.Device 'ATI Radeon HD 5670' on 'Apple' at 0x1021b00>
Choice, comma-separated [0]:1
Set the environment variable PYOPENCL_CTX='1' to avoid being asked again.
0.0
这里出了什么问题?提前谢谢!
答案 0 :(得分:0)
在剧本结束时:
print la.norm(a_plus_b - (a+b))
如果一切正常,那么0.0是预期的返回值......