inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.05k stars 241 forks source link

"No constructor defined" error #492

Closed ma-sadeghi closed 3 years ago

ma-sadeghi commented 3 years ago

I installed pyopencl on a fresh conda virtualenv, but when running pyopencl.device_info() I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: pyopencl._cl.device_info: No constructor defined!

Does that mean my GPU driver was not found?

PS. I also tried installing ocl-icd-system but didn't help.

inducer commented 3 years ago

No. device_info is a namespace for constants. It's not meant to be instantiated. Please follow the examples.