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

Function ggml_argmax

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

Source from the content-addressed store, hash-verified

2432// ggml_argmax
2433
2434struct ggml_tensor * ggml_argmax(
2435 struct ggml_context * ctx,
2436 struct ggml_tensor * a) {
2437 GGML_ASSERT(ggml_is_matrix(a));
2438 GGML_ASSERT(a->ne[0] <= INT32_MAX);
2439
2440 struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_I32, a->ne[1]);
2441
2442 result->op = GGML_OP_ARGMAX;
2443 result->src[0] = a;
2444
2445 return result;
2446}
2447
2448// ggml_count_equal
2449

Callers 7

build_graphMethod · 0.85
build_graphMethod · 0.85
ggml_opt_buildFunction · 0.85
ggml_vk_check_results_0Function · 0.85

Calls 2

ggml_is_matrixFunction · 0.85
ggml_new_tensor_1dFunction · 0.85

Tested by 2

build_graphMethod · 0.68
build_graphMethod · 0.68