diff options
Diffstat (limited to 'ethosu/vela/tensor.py')
-rw-r--r-- | ethosu/vela/tensor.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ethosu/vela/tensor.py b/ethosu/vela/tensor.py index 6a95bad4..008cd05e 100644 --- a/ethosu/vela/tensor.py +++ b/ethosu/vela/tensor.py @@ -114,7 +114,8 @@ class TensorPurpose(enum.IntFlag): ScratchFast = 4 LUT = 5 FSBias = 6 - Size = 7 + Virtual = 7 + Size = 8 def display_name(self) -> str: return ("Unknown", "Weights", "FeatureMap", "Scratch", "ScratchFast", "LUT", "FastStorageBias", "Size")[ @@ -297,6 +298,14 @@ class QuantizationParameters: return False +def create_virtual_tensor( + name: str, +): + virtual_tensor = Tensor([], DataType.int8, name) + virtual_tensor.purpose = TensorPurpose.Virtual + return virtual_tensor + + def create_const_tensor( name: str, shape: Shape, |