Skip to content

Conversation

@BrianHarrisonAMD
Copy link
Contributor

Motivation

Address non-blocking feedback, and clean-up from #4312.

Technical Details

Summary of changes:

  • Fix improper logging namespaces in several places
  • Improve env handling for logging to be more forgiving (remove whitespace, and ignore capitalization)
  • Remove duplicated files / functions for logging across components
  • Swap to enum instead of string compares everywhere
  • Improve locking for shared state

Test Plan

Build & tests are working for hipDNN + provider components

Test Result

Build & tests are passing locally, and waiting on CI

@BrianHarrisonAMD BrianHarrisonAMD self-assigned this Feb 9, 2026
Copy link
Contributor

@CMiservaAMD CMiservaAMD left a comment

Choose a reason for hiding this comment

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

LGTM.
Just holding-off on setting the PR to approved until I have a chance to see how difficult it might be to add changes in https://github.com/ROCm/rocm-libraries/compare/users/cmiserva/almiopen-1048/single-backend-spdlog?expand=1 to this PR.

@codecov-commenter
Copy link

codecov-commenter commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 91.57895% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
projects/hipdnn/backend/src/logging/Logging.hpp 88.57% 0 Missing and 4 partials ⚠️
projects/hipdnn/backend/src/logging/Logging.cpp 90.91% 1 Missing and 2 partials ⚠️
...in_sdk/include/hipdnn_plugin_sdk/PluginLogging.hpp 0.00% 1 Missing ⚠️

❌ 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    #4423      +/-   ##
===========================================
- Coverage    65.93%   65.35%   -0.58%     
===========================================
  Files         1600     1581      -19     
  Lines       254848   242154   -12694     
  Branches     35899    33925    -1974     
===========================================
- Hits        168021   158250    -9771     
+ Misses       71603    69886    -1717     
+ Partials     15224    14018    -1206     
Flag Coverage Δ *Carryforward flag
hipBLAS 90.67% <ø> (ø) Carriedforward from 2c08d63
hipBLASLt 43.62% <ø> (ø) Carriedforward from 2c08d63
hipDNN 81.83% <91.58%> (+0.24%) ⬆️
hipFFT 56.68% <ø> (+0.42%) ⬆️ Carriedforward from 2c08d63
hipRAND ?
hipSOLVER ?
hipSPARSE 84.70% <ø> (ø) Carriedforward from 2c08d63
rocBLAS 47.97% <ø> (ø) Carriedforward from 2c08d63
rocFFT 48.57% <ø> (-3.64%) ⬇️ Carriedforward from 2c08d63
rocSOLVER 76.83% <ø> (ø) Carriedforward from 2c08d63
rocSPARSE 71.53% <ø> (ø) Carriedforward from 2c08d63

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

Files with missing lines Coverage Δ
...a_sdk/include/hipdnn_data_sdk/logging/LogLevel.hpp 95.71% <100.00%> (+20.30%) ⬆️
...k/include/hipdnn_data_sdk/logging/LoggingUtils.hpp 100.00% <100.00%> (ø)
...k/include/hipdnn_data_sdk/utilities/StringUtil.hpp 94.19% <100.00%> (+0.68%) ⬆️
...in_sdk/include/hipdnn_plugin_sdk/PluginLogging.hpp 0.00% <0.00%> (ø)
projects/hipdnn/backend/src/logging/Logging.cpp 82.54% <90.91%> (+14.97%) ⬆️
projects/hipdnn/backend/src/logging/Logging.hpp 86.11% <88.57%> (-6.20%) ⬇️

... and 65 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.

@BrianHarrisonAMD
Copy link
Contributor Author

Codecov Report

❌ Patch coverage is 82.97872% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
projects/hipdnn/backend/src/logging/Logging.cpp 65.00% 4 Missing and 3 partials ⚠️
...in_sdk/include/hipdnn_plugin_sdk/PluginLogging.hpp 0.00% 1 Missing ⚠️
❌ 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    #4423      +/-   ##
===========================================
+ Coverage    65.32%   65.33%   +0.01%     
===========================================
  Files         1579     1579              
  Lines       242137   242162      +25     
  Branches     33920    33922       +2     
===========================================
+ Hits        158163   158195      +32     
+ Misses       69952    69947       -5     
+ Partials     14022    14020       -2     

Flag Coverage Δ *Carryforward flag
hipBLAS 90.67% <ø> (ø) Carriedforward from f45bbd9
hipBLASLt 43.62% <ø> (ø) Carriedforward from f45bbd9
hipDNN 81.49% <82.98%> (+0.09%) ⬆️
hipFFT 56.68% <ø> (ø) Carriedforward from f45bbd9
hipSPARSE 84.70% <ø> (ø) Carriedforward from f45bbd9
rocBLAS 47.97% <ø> (ø) Carriedforward from f45bbd9
rocFFT 48.57% <ø> (ø) Carriedforward from f45bbd9
rocSOLVER 76.83% <ø> (ø) Carriedforward from f45bbd9
rocSPARSE 71.53% <ø> (-<0.01%) ⬇️ Carriedforward from f45bbd9
*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
.../hipdnn/backend/src/logging/ComponentFormatter.hpp 63.16% <ø> (ø)
projects/hipdnn/backend/src/logging/Logging.hpp 92.31% <ø> (ø)
...ojects/hipdnn/backend/src/logging/LoggingUtils.hpp 100.00% <ø> (ø)
...a_sdk/include/hipdnn_data_sdk/logging/LogLevel.hpp 95.71% <100.00%> (+20.30%) ⬆️
...k/include/hipdnn_data_sdk/logging/LoggingUtils.hpp 100.00% <100.00%> (ø)
...k/include/hipdnn_data_sdk/utilities/StringUtil.hpp 94.19% <100.00%> (+0.68%) ⬆️
...in_sdk/include/hipdnn_plugin_sdk/PluginLogging.hpp 0.00% <0.00%> (ø)
projects/hipdnn/backend/src/logging/Logging.cpp 68.21% <65.00%> (+0.64%) ⬆️
... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:

The code files flagged are either covered by plugins, or are error handling from HIP errors that aren't covered by tests.

I think coverage looks good.

Copy link
Contributor

@mousdahl-amd mousdahl-amd left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mousdahl-amd mousdahl-amd left a comment

Choose a reason for hiding this comment

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

LGTM

@adickin-amd
Copy link
Contributor

PR Review Summary

This is a well-executed refactoring PR that enhances the logging infrastructure across hipDNN components. All changes are consistent, properly tested, and improve code quality.

Changes Summary

1. Namespace Cleanup

  • Corrected logging namespace references from hipdnn::logging to hipdnn_plugin_sdk::logging
  • Fixed backend logging namespace from hipdnn::backend::logging to hipdnn_backend::logging

2. Environment Variable Handling Improvements

  • Log level parsing is now case-insensitive (e.g., INFO, Info, info all accepted)
  • Leading and trailing whitespace is automatically trimmed from log level values
  • Added stringToSeverity() returning std::optional for explicit invalid input handling
  • Added stringToSeverityOrOff() convenience wrapper for backward compatibility

3. Code Consolidation

  • Removed duplicate CallbackSink.hpp from backend (functionality already exists in plugin_sdk)
  • Replaced string comparisons with enum comparisons for improved type safety and performance

4. Performance Optimization

  • Upgraded from std::mutex to std::shared_mutex for component name accessor, improving read concurrency

5. Test Coverage

  • Added comprehensive tests for the trim function
  • Added tests for both stringToSeverity() and stringToSeverityOrOff() functions
  • Validated case-insensitivity and whitespace handling behavior

Recommendation

Approve - The implementation is clean, consistent, and well-tested. No issues requiring action were identified.


Generated by Claude Code

BrianHarrisonAMD and others added 2 commits February 9, 2026 14:14
These empty calls served no purpose and were leftover from previous
refactoring. Removing them cleans up the CMake files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…OCm/rocm-libraries into users/bharriso/logging-changes-cleanup
Copy link
Contributor

@SamuelReeder SamuelReeder left a comment

Choose a reason for hiding this comment

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

LGTM!

@BrianHarrisonAMD BrianHarrisonAMD enabled auto-merge (squash) February 9, 2026 19:40
@BrianHarrisonAMD
Copy link
Contributor Author

Auto-merge enabled.

Please disable if blocking comments are added!

BrianHarrisonAMD and others added 4 commits February 10, 2026 10:41
…ng (#4440)

## Motivation

Remove spdlog/fmt dependency from hipblaslt-provider.
This change is part of removing spdlog/fmt from plugin_sdk.

## Technical Details

Changes:
- Convert logging to stream based style
- Remove hipdnn_enable_spdlog() calls from CMakeLists.txt files
- Remove spdlog includes and shutdown calls from test main.cpp files

## Test Plan

Build and tests are working locally (CI not enabled for
hipblaslt-provider yet).
Logs are properly output (unchanged).

## Test Result

Build and tests are continuing to pass.
Logs are printing properly.

---

### Note

Off the logging clean-up branch (PR #4423) that is about to be merged. 
This ensures we have the latest namespaces, and other clean-up changes
for this work.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
)

## Motivation

Remove spdlog/fmt dependency from miopen-provider.
This change is part of removing spdlog/fmt from plugin_sdk.

## Technical Details

Changes:
- Convert logging to stream based style
- Remove hipdnn_enable_spdlog() calls from CMakeLists.txt files
- Remove spdlog includes and shutdown calls from test main.cpp files

## Test Plan

Build and tests are working locally and in CI.
Sanity check logging to ensure it's functioning same as before for
samples, and tests.

## Test Result

Build and tests are continuing to pass.
Logs are printing properly.
Waiting on CI signal.

---

### Note

Off the logging clean-up branch (PR #4423) that is about to be merged. 
This ensures we have the latest namespaces, and other clean-up changes
for this work.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@adickin-amd
Copy link
Contributor

Issuing gardener override, the windows CI issue is known and waiting for another full CI run could take another day leading to more postponed work.

@adickin-amd adickin-amd disabled auto-merge February 11, 2026 15:39
@adickin-amd adickin-amd merged commit 65f68fa into develop Feb 11, 2026
38 of 43 checks passed
@adickin-amd adickin-amd deleted the users/bharriso/logging-changes-cleanup branch February 11, 2026 15:39
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.

6 participants