Add require check for out of range index output in ARGMAX
ARGMAX currently requires an i32_t output that indicates the
location of a value in the input tensor. However, under the
level `tosa_level_none`, the value of `tensor_size_t` can
exceed the range allowed by i32_t. As a result, this could
lead to undefined behaviour if the max value in the input is
located at an index > i32_t.
An example of a problematic case would look like:
`ARGMAX(TENSOR(shape=[9123372036854775808], dtype=f32), axis=0)`
This commit adds a REQUIRE condition to check this case.
Change-Id: I110a1ef3af1ba65efa703ce89e1888e7cf7f8a68
Signed-off-by:
Luke Hutton <luke.hutton@arm.com>
Loading
Please register or sign in to comment