aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/softmax.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2021-04-08 09:04:00 +0200
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2021-04-08 11:21:35 +0200
commitee99bb124b088430b97d205df9fc90a1e9412e0c (patch)
treebfb1a6799f9e9ff9d0f387471277b8a26edbab70 /ethosu/vela/softmax.py
parent95b279f1454d58a93238851cb5ff394c7782ad32 (diff)
downloadethos-u-vela-ee99bb124b088430b97d205df9fc90a1e9412e0c.tar.gz
MLBEDSW-4334 Non-linear format decision in graph opt.
Check if non linear tensor format can be used is refactored. -Flag avoid_NHCWB16 replaced with needs_linear_format -Checking restrictions located to one function in graph optimiser. Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: Iec5c7996a1a6039cad052197f1ae56f7c0290440
Diffstat (limited to 'ethosu/vela/softmax.py')
-rw-r--r--ethosu/vela/softmax.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/ethosu/vela/softmax.py b/ethosu/vela/softmax.py
index 520ec23e..13ca319b 100644
--- a/ethosu/vela/softmax.py
+++ b/ethosu/vela/softmax.py
@@ -217,9 +217,7 @@ class SoftMax:
ifm_shape = self.op.ifm_shapes[0]
if ifm_shape.batch > 1:
self.op.ifm_shapes[0] = ifm_shape.with_height(ifm_shape.batch * ifm_shape.height).with_batch(1)
- self.op.ifm.avoid_NHCWB16 = True
self.op.ofm_shapes[0] = self.op.ifm_shapes[0]
- self.op.ofm.avoid_NHCWB16 = True
if ifm.dtype in (DataType.uint8, DataType.int8) and ofm.dtype == ifm.dtype:
return self.get_graph_8bit(ifm, ofm)
@@ -262,7 +260,6 @@ class SoftMax:
sub_op_quantization = one_scale_quant.clone()
sub_op_quantization.zero_point = 127
ifm_max_shape = Shape4D([1, ifm_shape.height, ifm_shape.width, 1])
- ifm_max.avoid_NHCWB16 = True
sub_op = create_sub(
f"{self.op.name}_sub{pass_number}",
ifm,
@@ -449,7 +446,6 @@ class SoftMax:
# PASS 1 - Sub
ifm_max_shape = Shape4D([1, ifm_shape.height, ifm_shape.width, 1])
- ifm_max.avoid_NHCWB16 = True
sub1_ofm = add_op_get_ofm(
create_sub(
f"{self.op.name}_sub{pass_number}",