From 56a71b0108f43a1cb118b1e2fae902c31b2a9969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Alfv=C3=A9n?= Date: Wed, 19 Oct 2022 11:20:12 +0200 Subject: MLBEDSW-7019: Update to elementwise cascading - The cascade builder is using the ifm_ifm2_correct_order function in order to decide if the operator is cascadable or not. The problem is that this function expects a full shape or no shape and the cascade builder did not provide that, so the operator was reported to be non cascadable. - The fix is to provide a full 4D shape, also refactoring ifm_ifm2_correct_order to use 4D shape to avoid confusion in the future. - Refactoring code so that the scheduler can perform a correct ifm and ifm2 swap. Signed-off-by: Johan Alfven Change-Id: I9a86c4690612f332afa428456a07e67698852495 --- ethosu/vela/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethosu/vela/scheduler.py') diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py index 208b121e..79cd6421 100644 --- a/ethosu/vela/scheduler.py +++ b/ethosu/vela/scheduler.py @@ -227,7 +227,7 @@ class SchedulerOperation: # Perform an IFM swap for certain binary elementwise operators # in order to enable cascading, if the SchedOp conforms to # Elementwise cascading rules. - if self.op_type.is_binary_elementwise_op() and CascadeBuilder.element_wise_cascading_conformity(self): + if self.op_type.is_binary_elementwise_op() and CascadeBuilder.elementwise_cascading_conformity(self): ifm1 = ps.ifm_tensor ifm2 = ps.ifm2_tensor ofm = ps.ofm_tensor -- cgit v1.2.1