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

Function get_gpu_info

examples/llama-bench/llama-bench.cpp:104–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static std::string get_gpu_info() {
105 std::string id;
106#ifdef GGML_USE_CUBLAS
107 int count = ggml_cuda_get_device_count();
108 for (int i = 0; i < count; i++) {
109 char buf[128];
110 ggml_cuda_get_device_description(i, buf, sizeof(buf));
111 id += buf;
112 if (i < count - 1) {
113 id += "/";
114 }
115 }
116#endif
117 // TODO: other backends
118 return id;
119}
120
121// command line params
122enum output_formats {CSV, JSON, MARKDOWN, SQL};

Callers 1

llama-bench.cppFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected