aboutsummaryrefslogtreecommitdiff
path: root/chapters/image.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2021-08-17 14:57:46 -0700
committerEric Kunze <eric.kunze@arm.com>2021-09-16 10:59:28 -0700
commit173fc16f46b2938ff49a39fb2dad31c54161a874 (patch)
tree0e17d2d391353fab462fa78e854538a9f2e4a629 /chapters/image.adoc
parent32de3912884dc2dc1425b61c419bbd30f2adbbbd (diff)
downloadspecification-173fc16f46b2938ff49a39fb2dad31c54161a874.tar.gz
Clarify range limitations for tensors
Catch zero and negative sized tensors. Clarify configuration of bool_t in the reference model. int4_t limitations on -8 to stay symmetric around 0. Pad values must be >= 0. Stride,dilation values must be >= 1. Change-Id: Idb6ef740f855912a8340475ba319816f90c9b051 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'chapters/image.adoc')
-rw-r--r--chapters/image.adoc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chapters/image.adoc b/chapters/image.adoc
index f997992..b8789ff 100644
--- a/chapters/image.adoc
+++ b/chapters/image.adoc
@@ -56,16 +56,18 @@ None
// Ensure image size is supported by GPU APIs and that for integer
// implementations, position * stride does not overflow int32_t.
ERROR_IF(max(OH,OW,IH,IW) >= 16384);
+ERROR_IF(stride_x <= 0 || stride_y <= 0);
if (resize_t == float_t) {
// The shift attribute is not used for floating point
ERROR_IF(shift != 0);
+ ERROR_IF(stride_x > IW || stride_y > IH);
} else {
// if in_t=int8_t ensure that an int32_t accumulator can be used
ERROR_IF(shift < 1 || shift > 11);
// set a consistent lower limit of 1/16 downscale
// independent of the shift value to simplify implementations
- ERROR_IF(stride_x <= 0 || stride_x >= (16 << shift));
- ERROR_IF(stride_y <= 0 || stride_y >= (16 << shift));
+ ERROR_IF(stride_x >= (16 << shift));
+ ERROR_IF(stride_y >= (16 << shift));
// offset range is similarly limited to maximum 16 pixels irrespective
// of shift. Both stride and offset fit in int16_t when shift=11.
ERROR_IF(offset_x <= (-16 << shift) || offset_x >= (16 << shift));