|
|
|
@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
|
|
|
|
|
"""A package for processing and analysis of non-hierarchical gate-level VLSI designs. |
|
|
|
|
|
|
|
|
|
The kyupy package itself contains a logger and other simple utility functions. |
|
|
|
|
In addition, it defines a ``numba`` and a ``cuda`` module that point to the actual modules |
|
|
|
|
if they are available and point to mocks if numba is not installed. |
|
|
|
|
In addition, it defines a ``numba`` and a ``cuda`` objects that point to the actual packages |
|
|
|
|
if they are available and otherwise point to mocks. |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
import time |
|
|
|
@ -202,5 +202,12 @@ if importlib.util.find_spec('numba') is not None:
@@ -202,5 +202,12 @@ if importlib.util.find_spec('numba') is not None:
|
|
|
|
|
cuda = MockCuda() |
|
|
|
|
else: |
|
|
|
|
numba = MockNumba() |
|
|
|
|
"""If Numba is available on the system, it is the actual ``numba`` package. |
|
|
|
|
Otherwise, it simply defines an ``njit`` decorator that does nothing. |
|
|
|
|
""" |
|
|
|
|
cuda = MockCuda() |
|
|
|
|
"""If Numba is installed and Cuda GPUs are available, it is the actual ``numba.cuda`` package. |
|
|
|
|
Otherwise, it is an object that defines basic methods and decorators so that cuda-code can still |
|
|
|
|
run in the Python interpreter. |
|
|
|
|
""" |
|
|
|
|
log.warn('Numba unavailable. Falling back to pure Python.') |
|
|
|
|