aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/insert_dma.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/insert_dma.py')
-rw-r--r--ethosu/vela/insert_dma.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethosu/vela/insert_dma.py b/ethosu/vela/insert_dma.py
index 5c05fc8f..4ea4621d 100644
--- a/ethosu/vela/insert_dma.py
+++ b/ethosu/vela/insert_dma.py
@@ -27,8 +27,9 @@ binary_elementwise_op = set(("AddAct", "MulAct", "SubAct", "Maximum", "Minimum")
def insert_dma_cmd(op, arch):
- if op.type == "DMA":
- return op # Already rewritten
+ if op.type == "DMA" or not op.run_on_npu:
+ return op
+
for idx, tens in enumerate(op.inputs):
if tens.mem_type not in (MemType.Scratch, MemType.Scratch_fast):