aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/operation.py
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-06-04 15:51:24 +0200
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commitb2fb212216eaa29b96ddf270a0392172265ff02c (patch)
treee2ed4f847c267fd6d01765cab5faadc263593bf9 /ethosu/vela/operation.py
parent3c07c97e0202c1cf01eba06c24b37a8f15ff7a7c (diff)
downloadethos-u-vela-b2fb212216eaa29b96ddf270a0392172265ff02c.tar.gz
MLBEDSW-2420: Improved support for dilated convolution
- Dilation added to SET_KERNEL_STRIDE instruction - Kernel height/width adjusted for dilation - Updated padding calculation - Updated weight compression Change-Id: I0c8190223e223b039a305aba0f37896ae1de2b80 Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/operation.py')
-rw-r--r--ethosu/vela/operation.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py
index 338f962e..e8a03b7d 100644
--- a/ethosu/vela/operation.py
+++ b/ethosu/vela/operation.py
@@ -194,6 +194,10 @@ input and output tensors, as well as an attribute dictionary."""
return inputs, axis
+ def get_dilation_h_w(self):
+ _, dilation_h, dilation_w, _ = self.attrs.get("dilation", (1, 1, 1, 1))
+ return dilation_h, dilation_w
+
split_ops = set(("Split", "SplitV", "StridedSlice", "Slice", "UnpackReshaped"))
def is_split_op(self):