Skip to content
Snippets Groups Projects
Commit b3529336 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Add note about dev_type choice to Context constructor docs

parent 6ddc5b28
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,24 @@ Platforms, Devices and Contexts
:func:`create_some_context`. See, e.g. this
`explanation by AMD <http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71>`_.
.. note::
Because of how OpenCL changed in order to support Installable Client
Drivers (ICDs) in OpenCL 1.1, the following will *look* reasonable
but often actually not work::
import pyopencl as cl
ctx = cl.Context(dev_type=cl.device_type.ALL)
Instead, make sure to choose a platform when choosing a device by type::
import pyopencl as cl
platforms = cl.get_platforms()
ctx = cl.Context(
dev_type=cl.device_type.ALL,
properties=[(cl.context_properties.PLATFORM, platforms[0])])
.. note::
For
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment