MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_set_backend

Function ggml_set_backend

ggml.c:20556–20568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20554}
20555
20556void 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////////////////////////////////////////////////////////////////////////////////

Callers 3

offload_tensorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected