diff options
author | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-10-14 10:57:46 +0000 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-10-14 10:57:46 +0000 |
commit | 1068362a83dd15613561189c00e364cddfd3071d (patch) | |
tree | 05d09cdc84c2da6e8a5e9b33e15e3deda1a61219 /ethosu/vela | |
parent | 04986c0016e59993563490fe67052371fc0e1ad2 (diff) | |
download | ethos-u-vela-1068362a83dd15613561189c00e364cddfd3071d.tar.gz |
Revert "MLBEDSW-3219: Suppress CPU info for Const/Placeholder"
This reverts commit 04986c0016e59993563490fe67052371fc0e1ad2.
Reason for revert: Merged by mistake
Change-Id: I150ad9ba7074ad1e80f21180aeba56a454d9f748
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/operation.py | 3 | ||||
-rw-r--r-- | ethosu/vela/pass_packing.py | 2 | ||||
-rw-r--r-- | ethosu/vela/supported_operators.py | 3 | ||||
-rw-r--r-- | ethosu/vela/tflite_writer.py | 2 |
4 files changed, 3 insertions, 7 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index 9c438556..710511c6 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -271,9 +271,6 @@ class Op(Enum): def needs_bias(self): return bool(self.info.indices.biases) - def is_startup_init_op(self): - return self in (Op.Const, Op.Placeholder, Op.SubgraphInput) - @classmethod def op_set(cls, predicate): # Returns the set of all operator codes that fulfill the given predicate diff --git a/ethosu/vela/pass_packing.py b/ethosu/vela/pass_packing.py index db30cd66..5673c2df 100644 --- a/ethosu/vela/pass_packing.py +++ b/ethosu/vela/pass_packing.py @@ -90,7 +90,7 @@ quantization_ops = set((Op.Dequantize, Op.Max, Op.Min)) cpu_ops = set((Op.Softmax, Op.LRN, Op.Shape, Op.Pad, Op.AddN)) | quantization_ops npu_dma_ops = set((Op.DMA,)) -startup_init_ops = Op.op_set(Op.is_startup_init_op) +startup_init_ops = set((Op.Const, Op.Placeholder, Op.SubgraphInput)) memory_only_ops = set((Op.Squeeze, Op.Reshape, Op.QuantizedReshape, Op.ExpandDims,)) diff --git a/ethosu/vela/supported_operators.py b/ethosu/vela/supported_operators.py index 18496c54..4e989124 100644 --- a/ethosu/vela/supported_operators.py +++ b/ethosu/vela/supported_operators.py @@ -137,8 +137,7 @@ class SupportedOperators: def is_operator_supported(self, op): if op.type not in SupportedOperators.supported_operators: - if not op.type.is_startup_init_op(): - print('Info: "{}" is not supported on the NPU. Placing on CPU instead'.format(op.type)) + print('Info: "{}" is not supported on the NPU. Placing on CPU instead'.format(op.type)) return False for constraint in self.generic_constraints: valid, extra = constraint(op) diff --git a/ethosu/vela/tflite_writer.py b/ethosu/vela/tflite_writer.py index 4cb5df17..e24aa282 100644 --- a/ethosu/vela/tflite_writer.py +++ b/ethosu/vela/tflite_writer.py @@ -77,7 +77,7 @@ class TFLiteSerialiser: self.scratch_fast_buf_id = 1 # Always assign scratch_fast to buffer 1 self.buffers_to_write = [] # have an empty array there - self.ops_to_ignore = Op.op_set(Op.is_startup_init_op) + self.ops_to_ignore = set((Op.Const, Op.Placeholder, Op.SubgraphInput)) self.tensors_to_reshape = {} |