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,17 @@
from ..Tensor import Tensor
from .any_wise import any_wise
def cast(input_t : Tensor, dtype, output_t:Tensor=None) -> Tensor:
"""
cast operator
arguments
input_t
dtype
output_t compute result to this Tensor.
Tensor may be with different shape, but should match total size.
"""
return any_wise('O=I0', input_t, dtype=dtype, output_t=output_t)