]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
CUDA: lower-case PCI bus id, standardize for ggml (#22820)
authorJohannes Gäßler <redacted>
Fri, 8 May 2026 08:09:38 +0000 (10:09 +0200)
committerGitHub <redacted>
Fri, 8 May 2026 08:09:38 +0000 (10:09 +0200)
ggml/include/ggml-backend.h
ggml/src/ggml-cuda/ggml-cuda.cu

index d0c7e5a1be08f88ba4c635837fc20158835637fc..b6f73739809348b96b6432af34b9d2097ebf3df6 100644 (file)
@@ -169,7 +169,7 @@ extern "C" {
         // device type
         enum ggml_backend_dev_type type;
         // device id
-        //   for PCI devices, this should be the PCI bus id formatted as "domain:bus:device.function" (e.g. "0000:01:00.0")
+        //   for PCI devices, this should be the lower-case PCI bus id formatted as "domain:bus:device.function" (e.g. "0000:c1:00.0")
         //   if the id is unknown, this should be NULL
         const char * device_id;
         // device capabilities
index 8d21b2267f5e6af221d33b351cac3af7408601cc..925a9ffe04c1aba592469986e4b5b0f5e879648b 100644 (file)
@@ -5434,6 +5434,9 @@ ggml_backend_reg_t ggml_backend_cuda_reg() {
                 char pci_bus_id[32] = {};
                 CUDA_CHECK(cudaDeviceGetPCIBusId(pci_bus_id, sizeof(pci_bus_id), i));
                 dev_ctx->pci_bus_id = pci_bus_id;
+                for (char & c : dev_ctx->pci_bus_id) {
+                    c = std::tolower(c);
+                }
                 dev_ctx->op_offload_min_batch_size = min_batch_size;
 
                 ggml_backend_dev_t dev = new ggml_backend_device {