MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_interpolate_impl

Function ggml_interpolate_impl

subprojects/llama.cpp/ggml/src/ggml.c:4914–4934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4912// ggml_upscale / ggml_interpolate
4913
4914static struct ggml_tensor * ggml_interpolate_impl(
4915 struct ggml_context * ctx,
4916 struct ggml_tensor * a,
4917 int64_t ne0,
4918 int64_t ne1,
4919 int64_t ne2,
4920 int64_t ne3,
4921 uint32_t mode) {
4922 GGML_ASSERT((mode & 0xFF) < GGML_SCALE_MODE_COUNT);
4923 // TODO: implement antialias for modes other than bilinear
4924 GGML_ASSERT(!(mode & GGML_SCALE_FLAG_ANTIALIAS) || (mode & 0xFF) == GGML_SCALE_MODE_BILINEAR);
4925
4926 struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
4927
4928 ggml_set_op_params_i32(result, 0, (int32_t)mode);
4929
4930 result->op = GGML_OP_UPSCALE;
4931 result->src[0] = a;
4932
4933 return result;
4934}
4935
4936struct ggml_tensor * ggml_upscale(
4937 struct ggml_context * ctx,

Callers 3

ggml_upscaleFunction · 0.85
ggml_upscale_extFunction · 0.85
ggml_interpolateFunction · 0.85

Calls 2

ggml_new_tensor_4dFunction · 0.85
ggml_set_op_params_i32Function · 0.85

Tested by

no test coverage detected