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

Implement clpy.backend.is_available() #203

Open
LWisteria opened this issue Mar 5, 2019 · 0 comments
Open

Implement clpy.backend.is_available() #203

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

Comments

@LWisteria
Copy link
Member

LWisteria commented Mar 5, 2019

# TODO(tomoharu.kitawaki) use getDeviceCount which is implemented in OpenCL
'''
def is_available():
global _available
if _available is None:
_available = False
try:
_available = runtime.getDeviceCount() > 0
except Exception as e:
if (e.args[0] !=
'cudaErrorNoDevice: no CUDA-capable device is detected'):
raise
return _available
'''

@LWisteria LWisteria added enhancement New feature or request good first issue Good for newcomers labels Mar 5, 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