docs for numba and cuda
This commit is contained in:
1 parent
62cf56e98a
commit
ee30898cef
2 files changed
+12
-5
No files matched your search
@@ -1,10 +1,10 @@
|
|||||||
Miscellaneous
|
Miscellaneous
|
||||||
=============
|
=============
|
||||||
|
|
||||||
.. automodule:: kyupy.techlib
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. automodule:: kyupy
|
.. automodule:: kyupy
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
.. automodule:: kyupy.techlib
|
||||||
|
:members:
|
||||||
|
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
"""A package for processing and analysis of non-hierarchical gate-level VLSI designs.
|
"""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.
|
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
|
In addition, it defines a ``numba`` and a ``cuda`` objects that point to the actual packages
|
||||||
if they are available and point to mocks if numba is not installed.
|
if they are available and otherwise point to mocks.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import time
|
import time
|
||||||
@@ -202,5 +202,12 @@ if importlib.util.find_spec('numba') is not None:
|
|||||||
cuda = MockCuda()
|
cuda = MockCuda()
|
||||||
else:
|
else:
|
||||||
numba = MockNumba()
|
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()
|
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.')
|
log.warn('Numba unavailable. Falling back to pure Python.')
|
||||||
Reference in new issue
Block a user