KhronosGroup / OpenVX-cts

OpenVX Conformance Test Suite
Apache License 2.0
9 stars 6 forks source link

CTS ROIPoolingLayer reference code is incorrect #8

Open xzhan103 opened 4 years ago

xzhan103 commented 4 years ago

Reference code is from test_conformance/test_tensor_nn.c line:1953.

const int x_begin = CLAMP((size_t)(roi_x0 + dx_begin), 0, data_w);

Test case TensorNN.ROIPoolingLayer/2/S8 shows that there is a condition when (roi_x0 + dx_begin) is < 0. However, in equation, it is explicitly converted to size_t, which cause incorrect result of x_begin.