@@ -3296,28 +3296,28 @@ struct test_upscale : public test_case {
32963296 }
32973297};
32983298
3299- // GGML_OP_UPSCALE (ext )
3300- struct test_upscale_ext : public test_case {
3299+ // GGML_OP_UPSCALE (via ggml_interpolate )
3300+ struct test_interpolate : public test_case {
33013301 const ggml_type type;
33023302 const std::array<int64_t , 4 > ne;
33033303 const std::array<int64_t , 4 > ne_tgt;
3304- const ggml_scale_mode mode = GGML_SCALE_MODE_NEAREST;
3304+ const uint32_t mode = GGML_SCALE_MODE_NEAREST;
33053305
33063306 std::string vars () override {
33073307 return VARS_TO_STR4 (type, ne, ne_tgt, mode);
33083308 }
33093309
3310- test_upscale_ext (ggml_type type = GGML_TYPE_F32,
3310+ test_interpolate (ggml_type type = GGML_TYPE_F32,
33113311 std::array<int64_t , 4 > ne = {2 , 5 , 7 , 11 },
33123312 std::array<int64_t , 4 > ne_tgt = {5 , 7 , 11 , 13 },
3313- ggml_scale_mode mode = GGML_SCALE_MODE_NEAREST)
3313+ uint32_t mode = GGML_SCALE_MODE_NEAREST)
33143314 : type(type), ne(ne), ne_tgt(ne_tgt), mode(mode) {}
33153315
33163316 ggml_tensor * build_graph (ggml_context * ctx) override {
33173317 ggml_tensor * a = ggml_new_tensor (ctx, type, 4 , ne.data ());
33183318 ggml_set_name (a, " a" );
33193319
3320- ggml_tensor * out = ggml_upscale_ext (ctx, a, ne_tgt[0 ], ne_tgt[1 ],ne_tgt[2 ], ne_tgt[3 ], mode);
3320+ ggml_tensor * out = ggml_interpolate (ctx, a, ne_tgt[0 ], ne_tgt[1 ],ne_tgt[2 ], ne_tgt[3 ], mode);
33213321 ggml_set_name (out, " out" );
33223322
33233323 return out;
@@ -4799,8 +4799,10 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
47994799 for (ggml_scale_mode mode : {GGML_SCALE_MODE_NEAREST, GGML_SCALE_MODE_BILINEAR}) {
48004800 test_cases.emplace_back (new test_upscale (GGML_TYPE_F32, {512 , 512 , 3 , 2 }, 2 , mode));
48014801 test_cases.emplace_back (new test_upscale (GGML_TYPE_F32, {512 , 512 , 3 , 2 }, 2 , mode, true ));
4802- test_cases.emplace_back (new test_upscale_ext (GGML_TYPE_F32, {2 , 5 , 7 , 11 }, {5 , 7 , 11 , 13 }, mode));
4802+ test_cases.emplace_back (new test_interpolate (GGML_TYPE_F32, {2 , 5 , 7 , 11 }, {5 , 7 , 11 , 13 }, mode));
4803+ test_cases.emplace_back (new test_interpolate (GGML_TYPE_F32, {5 , 7 , 11 , 13 }, {2 , 5 , 7 , 11 }, mode));
48034804 }
4805+ test_cases.emplace_back (new test_interpolate (GGML_TYPE_F32, {2 , 5 , 7 , 11 }, {5 , 7 , 11 , 13 }, GGML_SCALE_MODE_BILINEAR | GGML_SCALE_FLAG_ALIGN_CORNERS));
48044806
48054807 test_cases.emplace_back (new test_sum ());
48064808 test_cases.emplace_back (new test_sum_rows ());
0 commit comments