[hipDNN] Pre-populate operation type enum and dispatch scaffolding for op lifting#5570
Open
SamuelReeder wants to merge 2 commits intodevelopfrom
Open
[hipDNN] Pre-populate operation type enum and dispatch scaffolding for op lifting#5570SamuelReeder wants to merge 2 commits intodevelopfrom
SamuelReeder wants to merge 2 commits intodevelopfrom
Conversation
SamuelReeder
commented
Mar 18, 2026
SamuelReeder
commented
Mar 18, 2026
5f54dfc to
eb76fe5
Compare
SamuelReeder
commented
Mar 18, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (77.21%) 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 #5570 +/- ##
===========================================
+ Coverage 67.27% 67.27% +0.01%
===========================================
Files 1844 1844
Lines 284014 284061 +47
Branches 39839 39860 +21
===========================================
+ Hits 191044 191092 +48
+ Misses 76512 76509 -3
- Partials 16458 16460 +2
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Every lifting PR needs to add entries to three shared files:
HipdnnOperationType.h(enum values),OperationUnpacker.hpp(dispatch cases), andNodeFactory.cpp/.hpp(factory dispatch). Without pre-populating these files, each lifting PR touches the same lines and causes merge conflicts.This PR front-loads all necessary enum values and dispatch stubs so that each individual lifting PR only needs to implement
unpack_from_descriptor()on its frontend node andfromNode()on its backend descriptor — no shared file conflicts.Technical Details
HipdnnOperationType.h— Extended thehipdnnOperationType_tenum with 11 new values (7–17):BATCHNORM,POINTWISE,MATMUL,RMSNORM,LAYERNORM,SDPA_FORWARD,BLOCK_SCALE_QUANTIZE,SDPA_BACKWARD,BLOCK_SCALE_DEQUANTIZE,CUSTOM_OP, andREDUCTION.OperationUnpacker.hpp— Added#includedirectives for all 17 frontend node headers and added active dispatch cases increateNodeForType()for all 15 operation types that have existing node classes (everything exceptREDUCTION). Each case instantiates the node with default-constructed attributes. SinceINode::unpack_from_descriptor()returns "not implemented" by default, these cases are safe: they produce a clear error until each lifting PR overrides the method on its specific node class.NodeFactory.cpp/NodeFactory.hpp— Added commented-out dispatch cases and#includedirectives for all 15 remaining operation descriptors. Each block is labeled with a comment to uncomment whenfromNode()is implemented in the corresponding lifting PR.BackendEnumStringUtils.hpp— Added#include "HipdnnOperationType.h", a newhipdnnGetOperationTypeString()function covering all 18 enum values, and two previously missing attribute name string cases:HIPDNN_ATTR_OPERATION_TYPE_EXTandHIPDNN_ATTR_OPERATION_NAME_EXT.TestBackendEnumStringUtils.cpp— Added aGetOperationTypeStringtest covering all 18 enum values plus the unknown sentinel, tests for the two newly added attribute name strings, and an unknown-attribute sentinel test.Note:
DescriptorFactory,GraphUnpacker,Graph.hpp,CMakeLists, andtest_sdkwere already fully populated during the lowering PRs and are not conflict points for lifting.Test Plan
hipdnn_backendandhipdnn_frontendTestBackendEnumStringUtilspasses (all 10 test cases)TestOperationUnpackerpasses (all 2 test cases)Submission Checklist