diff options
author | Dwight Lidman <dwight.lidman@arm.com> | 2020-08-13 13:11:48 +0200 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2020-08-18 18:52:46 +0000 |
commit | 940fdee086d77089c7669190392c92f4f2150348 (patch) | |
tree | baa7769b3567ebd5b71491ad3d6a97772b7efbd0 /ethosu/vela/tensor.py | |
parent | 29d568e73373e82ef2dd246a64ba399fe6da676a (diff) | |
download | ethos-u-vela-940fdee086d77089c7669190392c92f4f2150348.tar.gz |
MLBEDSW-2589: Skip weight compression for CPU ops
This commit fixes a bug where CPU ops were getting
passed on as NPU ops in weight_compressor.py due to
Operation.find_npu_op() incorrectly returning any
op with an 'npu_block_type' attribute (which every
op has) as an NPU op.
Signed-off-by: Dwight Lidman <dwight.lidman@arm.com>
Change-Id: I7a758f8d1b1237907816bc1be7b77aff765ae688
Diffstat (limited to 'ethosu/vela/tensor.py')
-rw-r--r-- | ethosu/vela/tensor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/tensor.py b/ethosu/vela/tensor.py index 312e8f35..c41a7ebf 100644 --- a/ethosu/vela/tensor.py +++ b/ethosu/vela/tensor.py @@ -626,7 +626,7 @@ class Tensor: for op in self.consumers(): if op.type == "DMA": return op.outputs[0].find_npu_op() - if "npu_block_type" in op.attrs: + if op.run_on_npu: return op return None |