TOSA: Added decomposition of PAD
Added support for:
-Rank > 4 and batch > 1
-Tensor dimensions exceeding NPU limit
-Padding in any dimension
(Implementation for functional compliance,
not considering performance)
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: Ief58fb3233d885f10ba5e68c5374b190efbe9351
diff --git a/ethosu/vela/operation_util.py b/ethosu/vela/operation_util.py
index 0fbed46..29caf6d 100644
--- a/ethosu/vela/operation_util.py
+++ b/ethosu/vela/operation_util.py
@@ -50,6 +50,12 @@
return op
+def create_pad_nop(name: str) -> Operation:
+ op = Operation(Op.Pad, name)
+ op.run_on_npu = True
+ return op
+
+
def create_depthwise_maxpool(
name: str,
ifm: Tensor,