Skip to content
Commit 2c256f18 authored by Luke Hutton's avatar Luke Hutton Committed by Eric Kunze
Browse files

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's avatarLuke Hutton <luke.hutton@arm.com>
parent 065620ad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment