Skip to content

Commit e236d2e

Browse files
committed
Print the devices names
1 parent 4b40a71 commit e236d2e

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ static ggml_cuda_device_info ggml_cuda_init() {
204204
GGML_LOG_INFO("%s: GGML_CUDA_FORCE_CUBLAS: no\n", __func__);
205205
#endif // GGML_CUDA_FORCE_CUBLAS
206206
GGML_LOG_INFO("%s: found %d " GGML_CUDA_NAME " devices:\n", __func__, info.device_count);
207+
std::vector<std::pair<int, std::string>> affected_devices;
207208
for (int id = 0; id < info.device_count; ++id) {
208209
int device_vmm = 0;
209210

@@ -261,12 +262,28 @@ static ggml_cuda_device_info ggml_cuda_init() {
261262
info.devices[id].cc = 100*prop.major + 10*prop.minor;
262263
GGML_LOG_INFO(" Device %d: %s, compute capability %d.%d, VMM: %s\n",
263264
id, prop.name, prop.major, prop.minor, device_vmm ? "yes" : "no");
264-
if (ggml_cuda_highest_compiled_arch(info.devices[id].cc) >= GGML_CUDA_CC_TURING && info.devices[id].nsm <= 24 && info.devices[id].cc == 750)
265-
GGML_LOG_INFO("Turing without tensor cores detected. Please compile with different options (e.g. `-DCMAKE_CUDA_ARCHITECTURES=61 -DGGML_CUDA_FORCE_MMQ=1`) for better performance.\n");
266-
267-
#endif // defined(GGML_USE_HIP)
265+
std::string device_name(prop.name);
266+
if (device_name == "NVIDIA GeForce MX450") {
267+
affected_devices.push_back({ id, device_name });
268+
}
269+
if (device_name == "NVIDIA GeForce MX550") {
270+
affected_devices.push_back({ id, device_name });
271+
}
272+
if (device_name.substr(0, 21) == "NVIDIA GeForce GTX 16") {
273+
affected_devices.push_back({ id, device_name });
274+
}
275+
#endif // defined(GGML_USE_HIP)
276+
}
277+
if (ggml_cuda_highest_compiled_arch(GGML_CUDA_CC_TURING) >= GGML_CUDA_CC_TURING && affected_devices.size()) {
278+
GGML_LOG_INFO("These devices will have affected performance due to lack of tensor cores:\n");
279+
for (size_t affected_id = 0; affected_id < affected_devices.size(); affected_id++) {
280+
GGML_LOG_INFO(
281+
" Device %d: %s\n", affected_devices[affected_id].first, affected_devices[affected_id].second.c_str());
282+
}
283+
GGML_LOG_INFO(
284+
"If you don't plan to use other devices, consider compiling with different options (e.g. "
285+
"`-DCMAKE_CUDA_ARCHITECTURES=61 -DGGML_CUDA_FORCE_MMQ=1`) for better performance.\n");
268286
}
269-
270287
for (int id = 0; id < info.device_count; ++id) {
271288
info.default_tensor_split[id] /= total_vram;
272289
}

0 commit comments

Comments
 (0)