aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/insert_dma.py
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-11-25 20:58:51 +0100
committerLouis Verhaard <louis.verhaard@arm.com>2020-11-26 08:57:21 +0100
commitc21d1c76b21f337d46990c2c262bda536f15e930 (patch)
treeefba6330962b56850d7b62c5acdec43365c56636 /ethosu/vela/insert_dma.py
parent0dd21c79ac6ef588e23393064d25e402e16cc2dd (diff)
downloadethos-u-vela-c21d1c76b21f337d46990c2c262bda536f15e930.tar.gz
MLBEDSW-3583: Prevent DMA for converted FullyConnected
Do not use DMA for weights of a FullyConnected op that has been converted to a Conv2D. Change-Id: Ibf6710c0a1723c8b48c563ca204f274af5ca88ce Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/insert_dma.py')
-rw-r--r--ethosu/vela/insert_dma.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ethosu/vela/insert_dma.py b/ethosu/vela/insert_dma.py
index fc1e7986..f02039cb 100644
--- a/ethosu/vela/insert_dma.py
+++ b/ethosu/vela/insert_dma.py
@@ -77,7 +77,9 @@ def insert_dma_cmd(op, arch, nng):
):
only_vector_product_consumers = True
for oper in tens.consumers():
- if oper is None or oper.type.npu_block_type != NpuBlockType.VectorProduct:
+ if oper is None or not (
+ oper.type.npu_block_type == NpuBlockType.VectorProduct or "is_converted_fc" in oper.attrs
+ ):
only_vector_product_consumers = False
break