Any way, here's a mini patch to fix at least the first example, in demo.py.
I just use the first device on the first platform that crops up.
On Tue, Jan 26, 2010 at 5:54 PM, David Garcia <david.rigel(a)gmail.com> wrote:
I think he meant to say "the first platform". I could be
wrong, of course.
I'm not convinced that there will often be multiple platforms on the same
device. I imagine, although this is pure speculation on my side, that
eventually NVidia will also support x86 CPUs in their CL drivers, probably
by themselves. It's not very difficult to support CPUs on OpenCL as long as
you don't try to squeeze the last drop of performance out of them. For this
reason I think the GPU you have will mostly determine the OpenCL driver you
will install in your system.
On Mon, Jan 25, 2010 at 11:39 PM, Rohit Garg <rpg.314(a)gmail.com> wrote:
> Actually, I think there will be 2 devices on most machines that devs
> are trying it out on now. In the near future, as IGP's integrate into
> the CPU we can expect 2 devices to be definitely there on all
> On Tue, Jan 26, 2010 at 5:09 AM, David Garcia <david.rigel(a)gmail.com>
> > I guess that on most machines there will only be one platform. In that
> > case
> > the examples should simply use it.
> > For the more general case where there are multiple platforms... I don't
> > really have a good solution and the problem is not simply the examples.
> > The
> > group didn't want to have a notion of a "default platform" because
> > would
> > just would cause installers to fight with each other to become the
> > default,
> > something like what you see with common file extensions in Windows when
> > you
> > install, say, Windows Media Player and Quicktime.
> > It's an inconvenient state of affairs and I don't know how/when it will
> > be
> > resolved. Maybe there's no solution that is clearly better than the
> > rest.
> > Delegating the decision to the app doesn't really solve things either.
> > Cheers,
> > David
> > On Mon, Jan 25, 2010 at 4:22 PM, Andreas Klöckner
> > <lists(a)informa.tiker.net>
> > wrote:
> >> On Montag 25 Januar 2010, Rohit Garg wrote:
> >> > Hi,
> >> >
> >> > 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
> >> > 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?
> >> Andreas
> >> _______________________________________________
> >> PyOpenCL mailing list
> >> PyOpenCL(a)tiker.net
> >> http://tiker.net/mailman/listinfo/pyopencl_tiker.net
> > _______________________________________________
> > PyOpenCL mailing list
> > PyOpenCL(a)tiker.net
> > http://tiker.net/mailman/listinfo/pyopencl_tiker.net
> Rohit Garg
> Senior Undergraduate
> Department of Physics
> Indian Institute of Technology
Department of Physics
Indian Institute of Technology