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

Function llama_host_malloc

llama.cpp:764–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762//
763
764inline void * llama_host_malloc(size_t n) {
765#ifdef GGML_USE_CUBLAS
766 if (ggml_cublas_loaded()) {
767 return ggml_cuda_host_malloc(n);
768 } else {
769 return malloc(n);
770 }
771#elif GGML_USE_METAL
772 return ggml_metal_host_malloc(n);
773#elif GGML_USE_CPU_HBM
774 return hbw_malloc(n);
775#else
776 return malloc(n);
777#endif
778}
779
780inline void llama_host_free(void * ptr) {
781#ifdef GGML_USE_CUBLAS

Callers 1

resizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected