Skip to content

[Exegesis] Print epsilon value in the sched model inconsistency report #80080

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

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llvm/test/tools/llvm-exegesis/X86/analysis-epsilons.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
# CHECK-CLUSTERS-ONE-NEXT: {{^}}0,
# CHECK-CLUSTERS-ONE-SAME: ,100.00{{$}}

# CHECK-INCONSISTENCIES-FAIL: Epsilon: <span class="mono">0.10</span>
# CHECK-INCONSISTENCIES-FAIL: contains instructions whose performance characteristics do not match that of LLVM
# CHECK-INCONSISTENCIES-FAIL: contains instructions whose performance characteristics do not match that of LLVM
# CHECK-INCONSISTENCIES-FAIL-NOT: contains instructions whose performance characteristics do not match that of LLVM

# CHECK-INCONSISTENCIES-PASS: Epsilon: <span class="mono">100.00</span>
# CHECK-INCONSISTENCIES-PASS-NOT: contains instructions whose performance characteristics do not match that of LLVM

---
Expand Down
3 changes: 3 additions & 0 deletions llvm/tools/llvm-exegesis/lib/Analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,9 @@ Error Analysis::run<Analysis::PrintSchedClassInconsistencies>(
OS << "</span></h3><h3>Cpu: <span class=\"mono\">";
writeEscaped<kEscapeHtml>(OS, FirstPoint.CpuName);
OS << "</span></h3>";
OS << "<h3>Epsilon: <span class=\"mono\">"
<< format("%0.2f", std::sqrt(AnalysisInconsistencyEpsilonSquared_))
<< "</span></h3>";

const auto &SI = State_.getSubtargetInfo();
for (const auto &RSCAndPoints : makePointsPerSchedClass()) {
Expand Down