Skip to content

feat(hipdnn): add persistent graph UUIDs - #10377

Merged
SamuelReeder merged 16 commits into
developfrom
users/sareeder/graph-uuid-identity
Aug 13, 2026
Merged

SamuelReeder merged 16 commits into
developfrom
users/sareeder/graph-uuid-identity

Conversation

@SamuelReeder

@SamuelReeder SamuelReeder commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a persistent opaque 128-bit identity generated at UUID v4 to finalized hipDNN serialized graphs so providers can identify graph instances without content hashing or structural comparison. The ID survives binary and JSON round trips, remains stable for immutable graph contents, and is replaced after graph mutation.

JIRA ID : ALMIOPEN-2391

Risk Assessment

Medium risk. This adds a backward-compatible serialized graph field and changes graph finalization/serialization behavior on Linux and Windows; local SDK and backend unit suites cover generation, compatibility, validation, and round-trip behavior.

ASIC Coverage

Standard PR CI is sufficient. This is ASIC-independent descriptor serialization and platform-RNG plumbing; it does not change kernel selection, provider support surface, or default dispatch behavior.

Testing Summary

  • FlatBuffers SDK unit tests cover UUID parsing, canonical JSON formatting, malformed JSON ID rejection and opaque ID compatibility, and legacy graph compatibility.
  • Backend unit tests cover finalization, binary/JSON round trips, graph mutation, opaque serialized IDs, and graph logging identity behavior.
  • Clang-tidy-enabled build of the affected SDK and backend test targets passed.

Testing Checklist

  • FlatBuffers SDK unit tests - build-uuid/bin/hipdnn_flatbuffers_sdk_tests - Status: Passed (166 tests)
  • Backend unit tests - build-uuid/bin/hipdnn_backend_tests - Status: Passed (3,367 tests)
  • Clang-tidy build - cmake --build build-uuid --target hipdnn_flatbuffers_sdk_tests hipdnn_backend_tests - Status: Passed
  • PR CI - GitHub PR checks - Status: Pending

Technical Changes

  • Extends the serialized Graph schema with an optional, backward-compatible opaque 128-bit identity and adds canonical JSON support.
  • Generates new IDs as UUID v4 values from OS CSPRNGs during successful graph finalization, preserving IDs through deserialization while invalidating them after graph-content mutation.
  • Adds focused tests for JSON ID format and opaque binary compatibility, legacy graphs, serialization lifecycles, mutation semantics, and logging behavior.

@therock-pr-bot

therock-pr-bot Bot commented Aug 5, 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?

…ph-uuid-identity

# Conflicts:
#	projects/hipdnn/backend/src/PlatformUtils.windows.cpp
#	projects/hipdnn/backend/tests/descriptors/TestGraphDescriptor.cpp
#	projects/hipdnn/flatbuffers_sdk/include/hipdnn_flatbuffers_sdk/utilities/json/Graph.hpp
@therock-pr-bot

therock-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.50276% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rojects/hipdnn/backend/src/logging/GraphLogger.cpp 68.75% 4 Missing and 6 partials ⚠️
...rojects/hipdnn/backend/src/PlatformUtils.linux.cpp 54.55% 4 Missing and 1 partial ⚠️
...hipdnn/backend/src/descriptors/GraphDescriptor.cpp 93.22% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10377      +/-   ##
===========================================
+ Coverage    68.93%   69.49%   +0.56%     
===========================================
  Files         2766     2765       -1     
  Lines       455651   455061     -590     
  Branches     67164    67107      -57     
===========================================
+ Hits        314073   316201    +2128     
+ Misses      118689   115911    -2778     
- Partials     22889    22949      +60     
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 38.12% <ø> (+0.05%) ⬆️ Carriedforward from fe743e9
TensileLite-Unit 75.90% <ø> (-0.04%) ⬇️ Carriedforward from fe743e9
hipBLAS 90.62% <ø> (ø) Carriedforward from fe743e9
hipBLASLt 34.89% <ø> (ø) Carriedforward from fe743e9
hipCUB 83.47% <ø> (+0.79%) ⬆️ Carriedforward from fe743e9
hipDNN 86.56% <89.50%> (+0.02%) ⬆️
hipFFT 49.22% <ø> (+1.91%) ⬆️ Carriedforward from fe743e9
hipRAND 76.12% <ø> (ø) Carriedforward from fe743e9
hipSOLVER 69.18% <ø> (+0.15%) ⬆️ Carriedforward from fe743e9
hipSPARSE 86.27% <ø> (-0.72%) ⬇️ Carriedforward from fe743e9
rocBLAS 48.23% <ø> (ø) Carriedforward from fe743e9
rocFFT 55.87% <ø> (+7.43%) ⬆️ Carriedforward from fe743e9
rocRAND 57.02% <ø> (ø) Carriedforward from fe743e9
rocSOLVER 76.92% <ø> (ø) Carriedforward from fe743e9
rocSPARSE 72.57% <ø> (+0.07%) ⬆️ Carriedforward from fe743e9
rocThrust 91.60% <ø> (ø) Carriedforward from fe743e9

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

Files with missing lines Coverage Δ
.../include/hipdnn_flatbuffers_sdk/utilities/Uuid.hpp 100.00% <100.00%> (ø)
...de/hipdnn_flatbuffers_sdk/utilities/json/Graph.hpp 90.38% <100.00%> (+0.75%) ⬆️
...hipdnn/backend/src/descriptors/GraphDescriptor.cpp 94.76% <93.22%> (+1.33%) ⬆️
...rojects/hipdnn/backend/src/PlatformUtils.linux.cpp 76.56% <54.55%> (-4.57%) ⬇️
...rojects/hipdnn/backend/src/logging/GraphLogger.cpp 71.74% <68.75%> (-0.48%) ⬇️

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

@SamuelReeder
SamuelReeder marked this pull request as ready for review August 6, 2026 13:53
@SamuelReeder
SamuelReeder requested a review from a team as a code owner August 6, 2026 13:53

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

LGTM thanks for the updates!

I think this could benefit from a bit deeper testing before merge.

@SamuelReeder
SamuelReeder force-pushed the users/sareeder/graph-uuid-identity branch from eab1d6b to f3abf6f Compare August 11, 2026 03:43
@SamuelReeder
SamuelReeder force-pushed the users/sareeder/graph-uuid-identity branch from f3abf6f to fe743e9 Compare August 11, 2026 03:49
@SamuelReeder
SamuelReeder merged commit 1f72b38 into develop Aug 13, 2026
105 of 127 checks passed
@SamuelReeder
SamuelReeder deleted the users/sareeder/graph-uuid-identity branch August 13, 2026 14:27
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