Skip to content

test(tensilelite): cover report=False on the later XCC reject paths - #10267

Open
tony-davis wants to merge 1 commit into
developfrom
users/todavis/ratchet-report-false-branches
Open

test(tensilelite): cover report=False on the later XCC reject paths#10267
tony-davis wants to merge 1 commit into
developfrom
users/todavis/ratchet-report-false-branches

Conversation

@tony-davis

Copy link
Copy Markdown
Contributor

The per-file coverage ratchet is failing on every hipBLASlt PR with ValidWorkGroupMappingXCC.py at 95.59% against a 100.00% baseline, on a file those PRs do not touch. This restores the coverage rather than lowering the baseline.

Two changes landed on develop eighteen minutes apart on 2026-07-31. #9355 (18:46Z) added report guards to three reject branches of _validateWorkGroupMappingXCC. #9123 (19:04Z) introduced coverage-baseline.json, recording that file at 100.00% from a snapshot taken before those lines existed. The baseline was stale on arrival.

The gap is three partial branches and zero missed statements: the if report: false arc at lines 91, 96 and 102, covering the not-power-of-two, does-not-divide, and exception paths. The existing test_report_false_is_side_effect_free only reaches the non-positive branch at line 86. Each guard is separate, so the suppression contract needs pinning per branch.

Test plan

The new parametrized test asserts each path returns False, prints nothing, and leaves _xcc_failures_by_file empty. Verified out of band that all three cases also print under report=True, so the parameters reach the intended branches instead of exiting early, and that branch coverage marks arcs 91->93, 96->98 and 102->104 covered. No production code changes.

I used plain assertions instead of snapshot here; the property is fully expressible inline and it avoids regenerating __snapshots__ for a gate fix.

PR #9355 added `if report:` guards to the not-power-of-two, does-not-divide
and exception branches of _validateWorkGroupMappingXCC. Only the non-positive
branch had a report=False test, so the false arc of the other three guards
(91->93, 96->98, 102->104) went uncovered and ValidWorkGroupMappingXCC.py
dropped from 100.00% to 95.59%.

The per-file coverage ratchet added by #9123 merged 18 minutes after #9355
with a baseline captured before those lines existed, so the gate now fails
on every hipBLASlt PR against a file it did not touch.

Pin the suppression per branch rather than lowering the baseline.

Co-authored-by: Cursor <cursoragent@cursor.com>
@therock-pr-bot

therock-pr-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

therock-pr-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds characterization test coverage to exercise the report=False suppression contract for the later reject branches in TensileLogic.ValidWorkGroupMappingXCC, restoring per-file branch coverage to match the existing ratcheted baseline without changing production code.

Changes:

  • Add a parametrized test that hits the not-power-of-two, CU-divisibility, and exception paths with report=False.
  • Assert each path returns False, produces no stdout output, and does not mutate _xcc_failures_by_file.

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project check has failed because the head coverage (76.92%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #10267   +/-   ##
========================================
  Coverage    69.62%   69.62%           
========================================
  Files         2741     2741           
  Lines       451544   451545    +1     
  Branches     66531    66531           
========================================
+ Hits        314370   314374    +4     
  Misses      116966   116966           
+ Partials     20208    20205    -3     
Flag Coverage Δ *Carryforward flag
TensileLite 34.19% <ø> (ø) Carriedforward from cb8ae6c
TensileLite-CPP 38.11% <ø> (-<0.01%) ⬇️
TensileLite-Unit 64.91% <ø> (+<0.01%) ⬆️
hipBLAS 90.62% <ø> (ø) Carriedforward from cb8ae6c
hipBLASLt 34.89% <ø> (ø)
hipCUB 83.47% <ø> (ø) Carriedforward from cb8ae6c
hipDNN 86.39% <ø> (ø) Carriedforward from cb8ae6c
hipFFT 47.34% <ø> (ø) Carriedforward from cb8ae6c
hipRAND 76.12% <ø> (ø) Carriedforward from cb8ae6c
hipSOLVER 69.18% <ø> (ø) Carriedforward from cb8ae6c
hipSPARSE 86.27% <ø> (ø) Carriedforward from cb8ae6c
rocBLAS 47.95% <ø> (ø) Carriedforward from cb8ae6c
rocFFT 47.61% <ø> (ø) Carriedforward from cb8ae6c
rocRAND 57.02% <ø> (ø) Carriedforward from cb8ae6c
rocSOLVER 76.92% <ø> (ø) Carriedforward from cb8ae6c
rocSPARSE 72.59% <ø> (ø) Carriedforward from cb8ae6c
rocThrust 91.60% <ø> (ø) Carriedforward from cb8ae6c

*This pull request uses carry forward flags. Click here to find out more.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants