On Tue, Jan 26, 2010 at 2:52 AM, Andreas Klöckner
On Montag 25 Januar 2010, Rohit Garg wrote:
I just downloaded, compiled and installed pyopencl from the git tree.
I am using AMD's opencl sdk for cpu's and it is working alright. When
I tried to run the demo.py example in the pyopencl distribution, it
threw an error.
Traceback (most recent call last):
File "demo.py", line 8, in <module>
ctx = cl.Context()
pyopencl.LogicError: Context failed: invalid platform
It appears that these examples have to be modified to specifically
select the device as now AMD's sdk ships with an ICD.
Thanks for reporting this. This appears to affect most example code in
PyOpenCL. I'd like to poll the list regarding what we should do here.
Should the examples become interactive and ask what platform to use? Or
should they pick one at random? Any other suggestions?
Provide examples of both. In the demo.py example (since it is the
simplest one), I'd suggest that available devices be listed and let
the user pick one to give an example of the API.
In other demos, simply choosing the first device that shows up in the
list should be good enough.
PyOpenCL mailing list
Department of Physics
Indian Institute of Technology