Skip to content

Conversation

@averinevg
Copy link
Contributor

Motivation

Tests were failing with error code 100 ("no ROCm-capable device is detected") when run in environments without GPUs. This affected all tests, not just GPU-specific ones, making it impossible to run the test suite in non-GPU environments.

In non-GPU environments:

  1. Any HIP API call triggers HIP runtime initialization
  2. HIP detects no GPU and sets hipErrorNoDevice (error 100)
  3. This error persists and cannot be cleared, even after calling hipGetLastError()
  4. The HipErrorHandler test listener checks for HIP errors after each test
  5. It detected this persistent error and failed all tests

Technical Details

Modified HipErrorHandler::OnTestEnd() to silently accept hipErrorNoDevice:

  • Check if the error is hipErrorNoDevice after calling hipGetLastError()
  • If true, return early without failing the test
  • This allows tests to run in non-GPU environments

Test Plan

Test Result

Submission Checklist

Copy link
Contributor

@BrianHarrisonAMD BrianHarrisonAMD left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks!

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project status has failed because the head coverage (76.83%) 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    #4426   +/-   ##
========================================
  Coverage    65.32%   65.32%           
========================================
  Files         1579     1579           
  Lines       242137   242137           
  Branches     33920    33920           
========================================
  Hits        158163   158163           
  Misses       69952    69952           
  Partials     14022    14022           
Flag Coverage Δ *Carryforward flag
hipBLAS 90.67% <ø> (ø) Carriedforward from ad03e58
hipBLASLt 43.62% <ø> (ø) Carriedforward from ad03e58
hipDNN 81.39% <ø> (ø)
hipFFT 56.68% <ø> (ø) Carriedforward from ad03e58
hipSPARSE 84.70% <ø> (ø) Carriedforward from ad03e58
rocBLAS 47.97% <ø> (ø) Carriedforward from ad03e58
rocFFT 48.57% <ø> (ø) Carriedforward from ad03e58
rocSOLVER 76.83% <ø> (ø) Carriedforward from ad03e58
rocSPARSE 71.53% <ø> (ø) Carriedforward from ad03e58

*This pull request uses carry forward flags. Click here to find out more.

🚀 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.

@averinevg averinevg merged commit 97d9ef5 into develop Feb 10, 2026
21 of 28 checks passed
@averinevg averinevg deleted the users/evaverin/fix-tests-for-non-gpu-environment branch February 10, 2026 14:29
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.

4 participants