aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/scheduler.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2020-12-01 16:02:29 +0100
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2020-12-18 16:33:32 +0100
commit2349d429d926e258e9a61d34c7fd97660ab9fb98 (patch)
treeb5151d0f12428e47d64b1fb2ce4f2f8c19304a0d /ethosu/vela/scheduler.py
parent528a56df829b65f7a2c61953650b123c461095f7 (diff)
downloadethos-u-vela-2349d429d926e258e9a61d34c7fd97660ab9fb98.tar.gz
MLBEDSW-3654 Add/use op ifm/ofm shapes
Add ifm/ofm shapes to op Changed to rely on these shapes Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: I571535a1dcadc2bdb04a3c727a8e1c49703b174d
Diffstat (limited to 'ethosu/vela/scheduler.py')
-rw-r--r--ethosu/vela/scheduler.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py
index 2c10640b..6cbff500 100644
--- a/ethosu/vela/scheduler.py
+++ b/ethosu/vela/scheduler.py
@@ -34,7 +34,6 @@ from .npu_performance import make_bandwidth_array
from .npu_performance import make_cycles_array
from .npu_performance import make_metrics_arrays
from .npu_performance import PassCycles
-from .numeric_util import full_shape
from .operation import NpuBlockType
from .operation import Op
from .operation import Operation
@@ -188,7 +187,7 @@ class StrategySet:
def __eq__(self, other):
if (self.bws != other.bws).any():
return False
- if (self.macs != other.macs).any():
+ if self.macs != other.macs:
return False
if (self.cycles != other.cycles).any():
return False
@@ -1000,10 +999,8 @@ class DynamicProgrammingScheduler:
rewrites.extend(get_rewrites(op))
# Detect no-op reshapes by comparing their full input and output tensor shapes.
- inshape = full_shape(4, op.inputs[0].shape, 1)
- compatible_shape = [
- (inshape == full_shape(4, oper.outputs[0].shape, 1)) for oper in get_rewrites(op)
- ]
+ inshape = op.ifm_shapes[0]
+ compatible_shape = [(inshape == oper.ofm_shapes[0]) for oper in get_rewrites(op)]
use_NHCWB16 = compatible_shape and all(compatible_shape)
else:
use_NHCWB16 = False