add xlib.avecl

This commit is contained in:
iperov 2021-09-30 18:21:30 +04:00
commit 0058474da7
56 changed files with 5569 additions and 0 deletions

View 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']