Skip to content

Commit 5c9ada2

Browse files
Fix CPUSummary type conversion for num_cores
- Convert Static.StaticInt to regular Int for compatibility - Ensures tests pass with CPUSummary.num_cores() output
1 parent 57711af commit 5c9ada2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/LinearSolveAutotune/src/gpu_detection.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ function get_system_info()
8888
info["cpu_name"] = "Unknown"
8989
end
9090

91-
# CPUSummary.num_cores() returns the physical cores
92-
info["num_cores"] = CPUSummary.num_cores()
91+
# CPUSummary.num_cores() returns the physical cores (as Static.StaticInt)
92+
info["num_cores"] = Int(CPUSummary.num_cores())
9393
info["num_logical_cores"] = Sys.CPU_THREADS
9494
info["num_threads"] = Threads.nthreads()
9595

@@ -167,7 +167,7 @@ function get_detailed_system_info()
167167
end
168168

169169
try
170-
system_data["cpu_cores"] = CPUSummary.num_cores()
170+
system_data["cpu_cores"] = Int(CPUSummary.num_cores())
171171
catch
172172
system_data["cpu_cores"] = "unknown"
173173
end

0 commit comments

Comments
 (0)