fix: detect CUDA by system install, not torch or driver cap
Worker is a separate subprocess that loads quantfunc.dll via ctypes and does not import torch, so torch.version.cuda does not describe what the DLL will actually load. Likewise, nvidia-smi only exposes the driver's max-supported CUDA, not the installed toolkit. Reorder detect_cuda_major() to: CUDA_PATH → installed toolkit on disk → nvidia-smi driver cap → torch (last-resort guess). Add Linux coverage for /opt/cuda and /usr/lib/cuda, and resolve unversioned symlinks like /usr/local/cuda → cuda-12.4 via os.path.realpath. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Y
yejianhui committed
6c0733979358047d9721a6100010783f19a88910
Parent: c0a7a05