Add uint64 to data types maps (#5603)

This commit is contained in:
Anton Chetverikov 2021-05-12 18:50:38 +03:00 committed by GitHub
parent b4565b7b4f
commit f2f44ce160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,7 @@ SUPPORTED_DATA_TYPES = {
'int32': (np.int32, 'I32', 'i32'), 'int32': (np.int32, 'I32', 'i32'),
'int64': (np.int64, 'I64', 'i64'), 'int64': (np.int64, 'I64', 'i64'),
'bool': (np.bool, 'BOOL', 'boolean'), 'bool': (np.bool, 'BOOL', 'boolean'),
'uint64': (np.uint64, 'U64', 'u64'),
# custom types # custom types
'U1': (packed_U1, 'U1', 'u1'), 'U1': (packed_U1, 'U1', 'u1'),

View File

@ -301,6 +301,7 @@ class IREngine(object):
'I4': (1, np.uint8), 'I4': (1, np.uint8),
'BOOL': (1, np.bool), 'BOOL': (1, np.bool),
'BIN': (1, np.uint8), 'BIN': (1, np.uint8),
'U64': (8, np.uint64)
} }
type_size, dtype = precision_map[precision] type_size, dtype = precision_map[precision]
layer_attrs[tag] = (int(offset), int(size) // type_size, in_port, dtype) layer_attrs[tag] = (int(offset), int(size) // type_size, in_port, dtype)
@ -316,7 +317,7 @@ class IREngine(object):
""" """
normalized_attrs = {} normalized_attrs = {}
for attr, value in attrs.items(): for attr, value in attrs.items():
value = value.replace('\"', '') value = value.replace('\"', '').replace(' ', '')
value = value.split(',') value = value.split(',')
n_value = [] n_value = []
for val in value: for val in value: