aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/numeric_util.py
diff options
context:
space:
mode:
authorCharles Xu <charles.xu@arm.com>2020-04-22 08:31:43 +0200
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commit3e9c4341acf6b8334977288e2079fec0be92ecb3 (patch)
tree579178aa8d2e69feb7faa5cc3a1b4173b0fe16a2 /ethosu/vela/numeric_util.py
parent286bd5e1f99242b1f7bf6ba628fc60ac03e91162 (diff)
downloadethos-u-vela-3e9c4341acf6b8334977288e2079fec0be92ecb3.tar.gz
MLBEDSW-1906: Extend IFM to full dimension
Extend IFM to full dimension for the performance metrics calculation. Change-Id: Iae923e37280ab0f22b7a272f28970973a5142534 Signed-off-by: Charles Xu <charles.xu@arm.com>
Diffstat (limited to 'ethosu/vela/numeric_util.py')
-rw-r--r--ethosu/vela/numeric_util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/numeric_util.py b/ethosu/vela/numeric_util.py
index 1722adc2..9adf5ecb 100644
--- a/ethosu/vela/numeric_util.py
+++ b/ethosu/vela/numeric_util.py
@@ -85,3 +85,6 @@ def clamp_sigmoid(x):
else:
y = 1 / (1 + math.exp(-x))
return y
+
+def full_shape(dim, shape, fill):
+ return ([fill] * (dim - len(shape))) + shape \ No newline at end of file