aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/graph_node.cc
diff options
context:
space:
mode:
authorTatWai Chong <tatwai.chong@arm.com>2022-06-08 12:17:14 -0700
committerEric Kunze <eric.kunze@arm.com>2022-08-10 23:12:28 +0000
commitf732609a51630c98bc3f448937988fbcf20dc854 (patch)
treec19aeb8919e4ae8db84b13559bd5858f5e785382 /reference_model/src/graph_node.cc
parent9391243d1c24d5a4e3c227ba9e3689cdb12d3e60 (diff)
downloadreference_model-f732609a51630c98bc3f448937988fbcf20dc854.tar.gz
Update TOSA resize to match specification
Attribute stride and shift are removed, and has new scale and border. Also add tests in the generator to test tf.resize with all option combinations. Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: If0f330d04395762d2d907863235eda1532f5e1ff
Diffstat (limited to 'reference_model/src/graph_node.cc')
-rw-r--r--reference_model/src/graph_node.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/reference_model/src/graph_node.cc b/reference_model/src/graph_node.cc
index 4629156..5f85932 100644
--- a/reference_model/src/graph_node.cc
+++ b/reference_model/src/graph_node.cc
@@ -219,3 +219,12 @@ int GraphNode::validateRequiredRank(const Tensor* t)
return 0;
}
+
+int GraphNode::idiv_check(int input1, int input2, int& result)
+{
+ ERROR_IF(input2 == 0, "idiv_check: input2 must not be zero");
+ ERROR_IF(input1 % input2 != 0, "idiv_check: input1 must be a multiple of input2");
+
+ result = input1 / input2;
+ return 0;
+}