Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-friendly error if no platform/device was found #186

Open
LWisteria opened this issue Feb 18, 2019 · 0 comments
Open

User-friendly error if no platform/device was found #186

LWisteria opened this issue Feb 18, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@LWisteria
Copy link
Member

LWisteria commented Feb 18, 2019

On a machine with no platform, current ClPy got an error as follows:

$ python
Python 3.6.5 (default, Feb 12 2019, 02:34:25)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import clpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/username/.pyenv/versions/clpy/lib/python3.6/site-packages/clpy-2.1.0b1-py3.6-linux-x86_64.egg/clpy/__init__.py", line 17, in <module>
    from clpy import core  # NOQA
  File "/home/username/.pyenv/versions/clpy/lib/python3.6/site-packages/clpy-2.1.0b1-py3.6-linux-x86_64.egg/clpy/core/__init__.py", line 1, in <module>
    from clpy.core import core  # NOQA
  File "clpy/backend/device.pxd", line 4, in init clpy.core.core
  File "/home/username/.pyenv/versions/clpy/lib/python3.6/site-packages/clpy-2.1.0b1-py3.6-linux-x86_64.egg/clpy/backend/__init__.py", line 4, in <module>
    from clpy.backend import device  # NOQA
  File "clpy/backend/device.pyx", line 1, in init clpy.backend.device
  File "clpy/backend/opencl/env.pyx", line 81, in init clpy.backend.opencl.env
  File "clpy/backend/opencl/api.pyx", line 16, in clpy.backend.opencl.api.GetPlatformIDs
  File "clpy/backend/opencl/exceptions.pyx", line 23, in clpy.backend.opencl.exceptions.check_status
clpy.backend.opencl.exceptions.OpenCLRuntimeError: UNKNOWN ERROR: -1001

That's bad (what's the unknown error??). The correct exception must be raised.

@LWisteria LWisteria added the enhancement New feature or request label Feb 18, 2019
@LWisteria LWisteria added the good first issue Good for newcomers label Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant