Skip to content

Commit 23f4b54

Browse files
Snektronsylvestre
authored andcommitted
fix non-strict HIP device lib order
1 parent 0ab3dac commit 23f4b54

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/compiler/c.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,13 @@ where
285285
.read_dir()
286286
.ok()
287287
.map(|f| {
288-
f.flatten()
288+
let mut device_libs = f
289+
.flatten()
289290
.filter(|f| f.path().extension().is_some_and(|ext| ext == "bc"))
290291
.map(|f| f.path())
291-
.collect()
292+
.collect::<Vec<_>>();
293+
device_libs.sort_unstable();
294+
device_libs
292295
})
293296
.unwrap_or_default()
294297
}

0 commit comments

Comments
 (0)