Skip to content

fix(hipsparse): destroy hipsparse handle during unwind - #14122

Merged
jsandham merged 14 commits into
ROCm:developfrom
jsandham:fix/hipsparse-local-handle-tests
Oct 25, 2026
Merged

jsandham merged 14 commits into
ROCm:developfrom
jsandham:fix/hipsparse-local-handle-tests

Conversation

@jsandham

@jsandham jsandham commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

  • Standardize hipSPARSE client tests on hipsparseLocalHandle_t.
  • Allows all tests to handle graph capture if turned on in the Arguments.
  • Ensure handle-creation failures stop the test and handles are destroyed during exception unwinding. This avoids memory leaks.
  • Remove the obsolete assertion-based handle_struct wrapper.

Test Plan

  • Build hipsparse-test.

JIRA ID: AISPARSE-891

jsandham and others added 8 commits October 21, 2026 16:05
A failed hipsparseCreate in handle_struct is reported by an assertion that returns from the verifier, so the wrapper can still be constructed with an uninitialized handle. These tests now use hipsparseLocalHandle_t, which throws on creation failure and destroys the handle when the test unwinds.
A failed hipsparseCreate in handle_struct is reported by an assertion that returns from the verifier, so the wrapper can still be constructed with an uninitialized handle. These tests now use hipsparseLocalHandle_t, which throws on creation failure and destroys the handle when the test unwinds.
A failed hipsparseCreate in handle_struct is reported by an assertion that returns from the verifier, so the wrapper can still be constructed with an uninitialized handle. These tests now use hipsparseLocalHandle_t, which throws on creation failure and destroys the handle when the test unwinds.
A failed hipsparseCreate in handle_struct is reported by an assertion that returns from the verifier, so the wrapper can still be constructed with an uninitialized handle. These tests now use hipsparseLocalHandle_t, which throws on creation failure and destroys the handle when the test unwinds.
A failed hipsparseCreate in handle_struct is reported by an assertion that returns from the verifier, so the wrapper can still be constructed with an uninitialized handle. These tests now use hipsparseLocalHandle_t, which throws on creation failure and destroys the handle when the test unwinds.
A failed hipsparseCreate in handle_struct is reported by an assertion that returns from the verifier, so the wrapper can still be constructed with an uninitialized handle. These tests now use hipsparseLocalHandle_t, which throws on creation failure and destroys the handle when the test unwinds.
A failed hipsparseCreate in handle_struct is reported by an assertion that returns from the verifier, so the wrapper can still be constructed with an uninitialized handle. These tests now use hipsparseLocalHandle_t, which throws on creation failure and destroys the handle when the test unwinds.
All client tests now use hipsparseLocalHandle_t, so the assertion-based handle_struct owner is no longer needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsandham
jsandham requested a review from a team as a code owner October 21, 2026 16:27
@jsandham jsandham changed the title Fix/hipsparse local handle tests fix(hipsparse): use hipsparse local handle in tests Oct 21, 2026
@therock-pr-bot

therock-pr-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 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 Oct 21, 2026 •

Copy link
Copy Markdown

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

@jsandham jsandham changed the title fix(hipsparse): use hipsparse local handle in tests fix(hipsparse): destroy hipsparse handle during unwind Oct 21, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14122      +/-   ##
===========================================
+ Coverage    75.84%   75.93%   +0.10%     
===========================================
  Files         2881     2873       -8     
  Lines       479150   477006    -2144     
  Branches     72006    71572     -434     
===========================================
- Hits        363369   362207    -1162     
+ Misses       90863    90102     -761     
+ Partials     24918    24697     -221     
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 48.93% <ø> (ø) Carriedforward from b331c13
TensileLite-Unit 83.65% <ø> (-0.03%) ⬇️ Carriedforward from b331c13
hipBLAS 90.62% <ø> (ø) Carriedforward from b331c13
hipBLASLt 64.34% <ø> (+0.03%) ⬆️ Carriedforward from b331c13
hipCUB 82.68% <ø> (ø) Carriedforward from b331c13
hipDNN 87.04% <ø> (+0.19%) ⬆️ Carriedforward from b331c13
hipFFT 42.00% <ø> (-0.56%) ⬇️ Carriedforward from b331c13
hipRAND 76.12% <ø> (ø) Carriedforward from b331c13
hipSOLVER 69.67% <ø> (ø) Carriedforward from b331c13
hipSPARSE 86.99% <ø> (ø)
rocBLAS 68.73% <ø> (+0.01%) ⬆️ Carriedforward from b331c13
rocFFT 48.10% <ø> (+2.42%) ⬆️ Carriedforward from b331c13
rocRAND 57.30% <ø> (-0.01%) ⬇️ Carriedforward from b331c13
rocSOLVER 76.74% <ø> (ø) Carriedforward from b331c13
rocSPARSE 76.92% <ø> (-0.24%) ⬇️ Carriedforward from b331c13
rocThrust 93.15% <ø> (ø) Carriedforward from b331c13

*This pull request uses carry forward flags. Click here to find out more.
see 144 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.

@amontoison amontoison 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.

Format check fails on a trailing space after "compile error " (line 158) in hipsparse_local_handle.hpp.

@jsandham
jsandham merged commit b421e83 into ROCm:develop Oct 25, 2026
102 checks passed
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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.

3 participants