| 20554 | } |
| 20555 | |
| 20556 | void ggml_set_backend(struct ggml_tensor * tensor, enum ggml_backend_type backend) { |
| 20557 | if (backend == GGML_BACKEND_CPU) { |
| 20558 | tensor->backend = GGML_BACKEND_CPU; |
| 20559 | return; |
| 20560 | } |
| 20561 | if (backend == GGML_BACKEND_GPU || backend == GGML_BACKEND_GPU_SPLIT) { |
| 20562 | #if defined(GGML_USE_CUBLAS) |
| 20563 | tensor->backend = backend; |
| 20564 | return; |
| 20565 | #endif |
| 20566 | } |
| 20567 | GGML_ASSERT(false && "invalid backend"); |
| 20568 | } |
| 20569 | |
| 20570 | //////////////////////////////////////////////////////////////////////////////// |
no outgoing calls
no test coverage detected