From cf72890e5dd89dada3189816a61d174b984086bd Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Thu, 30 Apr 2020 08:57:23 +0200 Subject: MLBEDSW-1998: Add support for new_axis_mask -Added support for new_axis_mask -Added support for more than 1 bit set in new/shrink_axis mask -Added checks for strided slice in supported operator check -Added assert if nothing has been put on NPU Change-Id: I66e2d04784f14d7ad82371f5d649a455d576a818 Signed-off-by: Patrik Gustavsson --- ethosu/vela/operation.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ethosu/vela/operation.py') diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index f36e61c6..a25574a6 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -248,12 +248,10 @@ input and output tensors, as well as an attribute dictionary.""" end_mask = self.attrs["end_mask"] new_axis_mask = self.attrs["new_axis_mask"] shrink_axis_mask = self.attrs["shrink_axis_mask"] - # TODO: Either extend this to support these different masks or check - # for this at an earlier stage and place the op on Cpu if needed - assert new_axis_mask == ellipsis_mask == 0 - # shrink_axis_mask is not supported by the Operation class but the operation + + # shrink_axis_mask/new_axis_mask/ellipsis_mask is not supported by the Operation class but the operation # may have the attribute modified and handled in the graph optimization phase. - assert shrink_axis_mask == 0 + assert shrink_axis_mask == new_axis_mask == ellipsis_mask == 0 assert len(input_tens.shape) == len(out_tens.shape) for idx in range(len(input_tens.shape)): -- cgit v1.2.1