| 2479 | } |
| 2480 | |
| 2481 | struct ggml_tensor * ggml_repeat_4d( |
| 2482 | struct ggml_context * ctx, |
| 2483 | struct ggml_tensor * a, |
| 2484 | int64_t ne0, int64_t ne1, int64_t ne2, int64_t ne3) { |
| 2485 | const bool can_repeat = ggml_is_empty(a) || ( |
| 2486 | (ne0 % a->ne[0] == 0) && |
| 2487 | (ne1 % a->ne[1] == 0) && |
| 2488 | (ne2 % a->ne[2] == 0) && |
| 2489 | (ne3 % a->ne[3] == 0) |
| 2490 | ); |
| 2491 | GGML_ASSERT(can_repeat); |
| 2492 | |
| 2493 | struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3); |
| 2494 | |
| 2495 | result->op = GGML_OP_REPEAT; |
| 2496 | result->src[0] = a; |
| 2497 | |
| 2498 | return result; |
| 2499 | } |
| 2500 | |
| 2501 | // ggml_repeat_back |
| 2502 |
no test coverage detected