diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-08-10 13:56:34 +0200 |
---|---|---|
committer | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-08-11 12:27:37 +0200 |
commit | d15866c06c88b9ec2e6313cc19f89ea65b528f8a (patch) | |
tree | 26dd354d0e49038ae0314445b60cece6e051701b /ethosu/vela/tosa_mapping.py | |
parent | ebb3b6fd78c54d6cf95b673aad3d868b798f91c7 (diff) | |
download | ethos-u-vela-d15866c06c88b9ec2e6313cc19f89ea65b528f8a.tar.gz |
MLBEDSW-4838 TOSA const data input changes
Adoptions related to changes for constant data
in TOSA.
Constant data not longer stored in .npy files, but
within the .tosa-file.
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: Ia1148c2f8b783b3926a1ee0b9ad0a3aeff9d22f5
Diffstat (limited to 'ethosu/vela/tosa_mapping.py')
-rw-r--r-- | ethosu/vela/tosa_mapping.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ethosu/vela/tosa_mapping.py b/ethosu/vela/tosa_mapping.py index 312ac92e..75ca43ef 100644 --- a/ethosu/vela/tosa_mapping.py +++ b/ethosu/vela/tosa_mapping.py @@ -17,6 +17,8 @@ # TOSA mapping functions used by reader. # Contains a mapping from the various TOSA enums and options structs, generated by the FlatBuffer code # generator, to Vela's internal format. +import numpy as np + from .data_type import DataType from .operation import Op from .operation import TensorIndices @@ -54,6 +56,15 @@ datatype_map = { DType.FLOAT: DataType.float32, } +datatype_map_numpy = { + DType.BOOL: np.bool, + DType.UINT8: np.uint8, + DType.INT8: np.int8, + DType.INT16: np.int16, + DType.INT32: np.int32, + DType.FLOAT: np.float32, +} + # TODO duplicate of tflite_mapping def underscore_to_camel_case(s): |