| 2432 | // ggml_argmax |
| 2433 | |
| 2434 | struct 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 |