Skip to content

Commit 0e65f75

Browse files
authored
Fix VM fallback logic on WSL2 (dmlc#11471) (dmlc#11480)
1 parent f143cb8 commit 0e65f75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/cuda_dr_utils.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ void MakeCuMemLocation(CUmemLocationType type, CUmemLocation *loc) {
139139
// Use the first GPU
140140
auto smi_ver = Split(TrimFirst(smi_split[1]), '.');
141141
// 570.124.06
142-
if (smi_ver.size() != 3) {
142+
// On WSL2, you can have driver version with two components, e.g. 573.24
143+
if (smi_ver.size() != 2 && smi_ver.size() != 3) {
143144
return Invalid();
144145
}
145146
try {

0 commit comments

Comments
 (0)