diff options
Diffstat (limited to 'reference_model/src/ops/image.cc')
-rw-r--r-- | reference_model/src/ops/image.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/reference_model/src/ops/image.cc b/reference_model/src/ops/image.cc index 90427e4..190b354 100644 --- a/reference_model/src/ops/image.cc +++ b/reference_model/src/ops/image.cc @@ -111,6 +111,11 @@ int OpResize<InDtype, OutDtype, resize_t>::eval() int16_t border_y = border[0]; int16_t border_x = border[1]; + // Check Tosa Level + auto tosa_level = g_func_config.tosa_level; + LEVEL_CHECK(scale_y_n / scale_y_d <= tosa_level.MAX_SCALE, "scale_y_n / scale_y_d should be smaller than or equal to MAX_SCALE"); + LEVEL_CHECK(scale_x_n / scale_x_d <= tosa_level.MAX_SCALE, "scale_x_n / scale_x_d should be smaller than or equal to MAX_SCALE"); + ERROR_IF(std::max<int>({ in_height, in_width, out_height, out_width }) >= 16384, "OpResize: exceeds maximum dimension"); ERROR_IF(in_batch != out_batch, "OpResize: output tensor batch mismatch"); |