MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / is_cuda_backend_handle

Function is_cuda_backend_handle

src/framework/core/backend.cpp:28–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26// register as "ROCm" and get their own BackendType::Hip. The names are spelled out here
27// instead of pulled from ggml-cuda.h/ggml-vulkan.h because those headers resolve against the
28// backend's own build flags, which are not visible from this translation unit.
29struct BackendRegNames {
30 BackendType type;
31 const char * names[3]; // unused entries are nullptr
32};
33
34constexpr BackendRegNames k_backend_reg_names[] = {
35 {BackendType::Cuda, {"CUDA", "MUSA", nullptr}},
36 {BackendType::Hip, {"ROCm", nullptr, nullptr}},
37 {BackendType::Vulkan, {"Vulkan", nullptr, nullptr}},
38 {BackendType::Metal, {"MTL", nullptr, nullptr}},
39};
40
41bool reg_name_matches(BackendType type, const char * reg_name) {
42 if (reg_name == nullptr) {

Callers 2

backend_typeFunction · 0.85
query_backend_memoryFunction · 0.85

Calls 2

ggml_backend_get_deviceFunction · 0.85

Tested by

no test coverage detected