RD-Agent icon indicating copy to clipboard operation
RD-Agent copied to clipboard

How to correctly configure the GPU in the qlib configuration file

Open kitcoun opened this issue 3 months ago • 2 comments

❓ Questions and Help

rdagent been talking about GPU-related topics in the chat conversation.

My qlib configuration settings: ` task: .....

 GPU: 0 

`

(base) ubuntu@PMS:~$ nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2025 NVIDIA Corporation Built on Tue_May_27_02:21:03_PDT_2025 Cuda compilation tools, release 12.9, V12.9.86 Build cuda_12.9.r12.9/compiler.36037853_0

The system has long had CUDA installed. Do I not need to install CUDA myself? Will the code install it automatically? Or do I need to configure something separately?

kitcoun avatar Sep 12 '25 22:09 kitcoun

You should install CUDA version Torch by yourself.

notes4mark avatar Oct 01 '25 05:10 notes4mark

Hi, @kitcoun Thank you for your attention to RD-Agent. Neither RD-Agent nor Qlib will automatically install CUDA. If your system already has CUDA installed, you don’t need to install it again. However, you do need to make sure that:

  1. Your PyTorch is the GPU version, not CPU-only;
  2. PyTorch's CUDA version is compatible with your system's CUDA driver;
  3. The GPU: 0 in Qlib's configuration just tells it to use the 0th GPU, you need to make sure that GPU is visible on the system.

SunsetWolf avatar Oct 14 '25 05:10 SunsetWolf