| 3433 | } |
| 3434 | |
| 3435 | struct ggml_tensor * ggml_cast( |
| 3436 | struct ggml_context * ctx, |
| 3437 | struct ggml_tensor * a, |
| 3438 | enum ggml_type type) { |
| 3439 | struct ggml_tensor * result = ggml_new_tensor(ctx, type, GGML_MAX_DIMS, a->ne); |
| 3440 | ggml_format_name(result, "%s (copy)", a->name); |
| 3441 | |
| 3442 | result->op = GGML_OP_CPY; |
| 3443 | result->src[0] = a; |
| 3444 | result->src[1] = result; // note: this self-reference might seem redundant, but it's actually needed by some |
| 3445 | // backends for consistency with ggml_cpy_impl() above |
| 3446 | |
| 3447 | return result; |
| 3448 | } |
| 3449 | |
| 3450 | // ggml_cont |
| 3451 |
no test coverage detected