mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-08-14 10:47:00 -07:00
add xlib.avecl
This commit is contained in:
parent
932edfe875
commit
0058474da7
56 changed files with 5569 additions and 0 deletions
24
xlib/avecl/_internal/NCore.py
Normal file
24
xlib/avecl/_internal/NCore.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
from .SCacheton import SCacheton
|
||||
from .Tensor import Tensor
|
||||
from .backend import *
|
||||
|
||||
class NCore:
|
||||
"""
|
||||
core functions
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def cleanup():
|
||||
"""
|
||||
try to cleanup all resources consumed by TensorCL.
|
||||
|
||||
can raise Exception
|
||||
"""
|
||||
SCacheton.cleanup()
|
||||
|
||||
if Tensor._object_count != 0:
|
||||
raise Exception(f'Unable to cleanup while {Tensor._object_count} Tensor objects exist.')
|
||||
|
||||
cleanup_devices()
|
||||
|
||||
__all__ = ['NCore']
|
Loading…
Add table
Add a link
Reference in a new issue