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

Function ggml_argsort

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

Source from the content-addressed store, hash-verified

5178// ggml_argsort
5179
5180struct ggml_tensor * ggml_argsort(
5181 struct ggml_context * ctx,
5182 struct ggml_tensor * a,
5183 enum ggml_sort_order order) {
5184 GGML_ASSERT(a->ne[0] <= INT32_MAX);
5185
5186 struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_I32, GGML_MAX_DIMS, a->ne);
5187
5188 ggml_set_op_params_i32(result, 0, (int32_t) order);
5189
5190 result->op = GGML_OP_ARGSORT;
5191 result->src[0] = a;
5192
5193 return result;
5194}
5195
5196// ggml_argsort_top_k
5197

Callers 4

build_graphMethod · 0.85
ggml_argsort_top_kFunction · 0.85
ggml_vk_check_results_0Function · 0.85

Calls 2

ggml_new_tensorFunction · 0.85
ggml_set_op_params_i32Function · 0.85

Tested by 1

build_graphMethod · 0.68