Просмотр исходного кода

cuda : avoid initializing unused devices (#16510)

Diego Devesa 3 месяцев назад
Родитель
Сommit
97870e6497
1 измененных файлов с 0 добавлено и 1 удалено
  1. 0 1
      ggml/src/ggml-cuda/ggml-cuda.cu

+ 0 - 1
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->device = i;
                 dev_ctx->name = GGML_CUDA_NAME + std::to_string(i);
                 dev_ctx->name = GGML_CUDA_NAME + std::to_string(i);
 
 
-                ggml_cuda_set_device(i);
                 cudaDeviceProp prop;
                 cudaDeviceProp prop;
                 CUDA_CHECK(cudaGetDeviceProperties(&prop, i));
                 CUDA_CHECK(cudaGetDeviceProperties(&prop, i));
                 dev_ctx->description = prop.name;
                 dev_ctx->description = prop.name;