Skip to content

Commit 1a30ef2

Browse files
zhuyuegongchensu
authored andcommitted
Convert Python list to InfiniCore Tensor
1 parent 5028ea4 commit 1a30ef2

File tree

4 files changed

+654
-4
lines changed

4 files changed

+654
-4
lines changed

python/infinicore/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
long,
2727
short,
2828
uint8,
29+
uint16,
30+
uint32,
31+
uint64,
2932
)
3033
from infinicore.ops.add import add
3134
from infinicore.ops.attention import attention
@@ -41,6 +44,7 @@
4144
ones,
4245
strided_empty,
4346
strided_from_blob,
47+
tensor,
4448
zeros,
4549
)
4650

@@ -74,6 +78,9 @@
7478
"long",
7579
"short",
7680
"uint8",
81+
"uint16",
82+
"uint32",
83+
"uint64",
7784
# Operations.
7885
"add",
7986
"attention",
@@ -87,6 +94,7 @@
8794
"ones",
8895
"strided_empty",
8996
"strided_from_blob",
97+
"tensor",
9098
"zeros",
9199
]
92100

python/infinicore/dtype.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def __hash__(self):
6868
half = float16
6969
bfloat16 = dtype(_infinicore.DataType.BF16)
7070
uint8 = dtype(_infinicore.DataType.U8)
71+
uint16 = dtype(_infinicore.DataType.U16)
72+
uint32 = dtype(_infinicore.DataType.U32)
73+
uint64 = dtype(_infinicore.DataType.U64)
7174
int8 = dtype(_infinicore.DataType.I8)
7275
int16 = dtype(_infinicore.DataType.I16)
7376
short = int16

0 commit comments

Comments
 (0)