Skip to content
Snippets Groups Projects
Commit d2737605 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Protect pystencils.opencl.autoinit with try..except

parent 71e64710
No related branches found
No related tags found
1 merge request!98WIP: Graph datahandling
......@@ -33,8 +33,7 @@ def add_path_to_ignore(path):
collect_ignore += [os.path.join(SCRIPT_FOLDER, path, f) for f in os.listdir(os.path.join(SCRIPT_FOLDER, path))]
collect_ignore = [os.path.join(SCRIPT_FOLDER, "doc", "conf.py"),
os.path.join(SCRIPT_FOLDER, "pystencils", "opencl", "opencl.autoinit")]
collect_ignore = [os.path.join(SCRIPT_FOLDER, "doc", "conf.py")]
add_path_to_ignore('pystencils_tests/benchmark')
add_path_to_ignore('_local_tmp')
......
......@@ -4,8 +4,13 @@ Automatically initializes OpenCL context using any device.
Use `pystencils.opencl.{init_globally_with_context,init_globally}` if you want to use a specific device.
"""
from pystencils.opencl import * # noqa
from pystencils.opencl.opencljit import * # noqa
from pystencils.opencl.opencljit import init_globally
from pystencils.opencl.opencljit import (
clear_global_ctx, init_globally, init_globally_with_context, make_python_function)
init_globally()
__all__ = ['init_globally', 'init_globally_with_context', 'clear_global_ctx', 'make_python_function']
try:
init_globally()
except Exception as e:
import warnings
warnings.warn(str(e))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment