From: Diego Devesa Date: Sat, 11 Oct 2025 11:02:26 +0000 (-0700) Subject: cuda : avoid initializing unused devices (#16510) X-Git-Tag: upstream/0.0.6764~32 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=97870e64975b26c5e06a3540a8dc0ff601351e86;p=pkg%2Fggml%2Fsources%2Fllama.cpp cuda : avoid initializing unused devices (#16510) --- diff --git a/ggml/src/ggml-cuda/ggml-cuda.cu b/ggml/src/ggml-cuda/ggml-cuda.cu index fb691528..856e9de2 100644 --- a/ggml/src/ggml-cuda/ggml-cuda.cu +++ b/ggml/src/ggml-cuda/ggml-cuda.cu @@ -3867,7 +3867,6 @@ ggml_backend_reg_t ggml_backend_cuda_reg() { dev_ctx->device = i; dev_ctx->name = GGML_CUDA_NAME + std::to_string(i); - ggml_cuda_set_device(i); cudaDeviceProp prop; CUDA_CHECK(cudaGetDeviceProperties(&prop, i)); dev_ctx->description = prop.name;