| 102 | } |
| 103 | |
| 104 | static 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 |
| 122 | enum output_formats {CSV, JSON, MARKDOWN, SQL}; |