aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ethosu/vela/graph_optimiser.py1
-rw-r--r--ethosu/vela/insert_dma.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py
index 58899054..85c2b602 100644
--- a/ethosu/vela/graph_optimiser.py
+++ b/ethosu/vela/graph_optimiser.py
@@ -338,6 +338,7 @@ def convert_batched_fc_to_conv(op, arch, nng):
"stride_h": 1,
"stride_w": 1,
"strides": (1, 1, 1, 1),
+ "is_converted_fc": True,
}
prev_op = ifm.ops[0]
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