gpu: Ensure driver version set before variant (#6480)

During rebasing, the ordering was inverted causing the cuda version
selection logic to break, with driver version being evaluated as zero
incorrectly causing a downgrade to v11.
This commit is contained in:
Daniel Hiltgen 2024-08-23 11:21:12 -07:00 committed by GitHub
parent 0b03b9c32f
commit 7a1e1c1caf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -264,6 +264,8 @@ func GetGPUInfo() GpuInfoList {
gpuInfo.computeMajor = int(memInfo.major)
gpuInfo.computeMinor = int(memInfo.minor)
gpuInfo.MinimumMemory = cudaMinimumMemory
gpuInfo.DriverMajor = driverMajor
gpuInfo.DriverMinor = driverMinor
variant := cudaVariant(gpuInfo)
if depPath != "" {
gpuInfo.DependencyPath = depPath
@ -275,8 +277,6 @@ func GetGPUInfo() GpuInfoList {
}
}
gpuInfo.Name = C.GoString(&memInfo.gpu_name[0])
gpuInfo.DriverMajor = driverMajor
gpuInfo.DriverMinor = driverMinor
gpuInfo.Variant = variant
// query the management library as well so we can record any skew between the two