diff options
Diffstat (limited to 'ethosu/vela/high_level_command_stream.py')
-rw-r--r-- | ethosu/vela/high_level_command_stream.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py index ddb24824..abf6d837 100644 --- a/ethosu/vela/high_level_command_stream.py +++ b/ethosu/vela/high_level_command_stream.py @@ -78,8 +78,14 @@ class Box: if strides is not None and skirt is not None: if len(new_start_coord) >= 2: stride = strides[2] - new_start_coord[-2] = max(new_start_coord[-2] * stride - skirt[1], 0) - new_end_coord[-2] = min(new_end_coord[-2] * stride + skirt[3], ifm_shape.width) + # if the current op was combined with a split slice read then the valid ifm range is given by the output + # of the split op + if split_offset is None: + new_start_coord[-2] = max(new_start_coord[-2] * stride - skirt[1], 0) + new_end_coord[-2] = min(new_end_coord[-2] * stride + skirt[3], ifm_shape.width) + else: + new_start_coord[-2] = max(new_start_coord[-2] * stride - skirt[1], split_offset[-2]) + new_end_coord[-2] = min(new_end_coord[-2] * stride + skirt[3], split_shape[-2]) if len(new_start_coord) >= 3: stride = strides[1] |