-
-
Notifications
You must be signed in to change notification settings - Fork 72
Add detailed CPU information from Sys.cpu_info() to telemetry #707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Extract CPU model and speed from Sys.cpu_info() - Display CPU model instead of generic CPU_NAME where available - Show CPU speed in MHz for better hardware identification - Detect heterogeneous CPU configurations - Calculate average/min/max speeds for systems with varying CPU speeds - Update telemetry output to show CPU model in GitHub issue comments - Maintain backward compatibility with existing cpu_name field This provides more specific hardware information for better benchmark analysis.
first_cpu = cpu_info[1] | ||
info["cpu_model"] = first_cpu.model | ||
info["cpu_speed_mhz"] = first_cpu.speed | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
info["cpu_model"] = "Unknown" | ||
info["cpu_speed_mhz"] = 0 | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
first_cpu = cpu_info[1] | ||
system_data["cpu_model"] = first_cpu.model | ||
system_data["cpu_speed_mhz"] = first_cpu.speed | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
else | ||
system_data["heterogeneous_cpus"] = false | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
# Calculate average CPU speed if speeds vary | ||
cpu_speeds = [cpu.speed for cpu in cpu_info] | ||
if length(unique(cpu_speeds)) > 1 | ||
system_data["cpu_speed_avg_mhz"] = round(mean(cpu_speeds), digits=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
system_data["cpu_speed_avg_mhz"] = round(mean(cpu_speeds), digits=0) | |
system_data["cpu_speed_avg_mhz"] = round(mean(cpu_speeds), digits = 0) |
system_data["cpu_model"] = "unknown" | ||
system_data["cpu_speed_mhz"] = 0 | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
push!(lines, "- **Architecture**: $(get(system_info, "architecture", get(system_info, "arch", "unknown")))") | ||
push!(lines, "- **CPU**: $(get(system_info, "cpu_name", "unknown"))") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
push!(lines, "- **Architecture**: $(get(system_info, "architecture", get(system_info, "arch", "unknown")))") | |
push!(lines, "- **CPU**: $(get(system_info, "cpu_name", "unknown"))") | |
push!(lines, | |
"- **Architecture**: $(get(system_info, "architecture", get(system_info, "arch", "unknown")))") | |
# Fallback to legacy CPU name | ||
push!(lines, "- **CPU**: $(get(system_info, "cpu_name", "unknown"))") | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Summary
Details
This PR enhances the system information collection in LinearSolveAutotune by extracting detailed CPU information from Julia's function:
New Information Collected:
Display Updates:
Backward Compatibility:
Example Output
Before:
After:
Testing
Added test file that verifies:
Benefits