feat(hipdnn): Add ragged offset multiplier to tensor attributes - #12190
Open
jerehartAMD wants to merge 3 commits into
Open
jerehartAMD wants to merge 3 commits into
jerehartAMD wants to merge 3 commits into
Conversation
…ged-offset-multiplier
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
…ged-offset-multiplier
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #12190 +/- ##
===========================================
- Coverage 70.55% 70.31% -0.24%
===========================================
Files 2812 2812
Lines 463054 462931 -123
Branches 68187 68147 -40
===========================================
- Hits 326694 325499 -1195
- Misses 112708 113879 +1171
+ Partials 23652 23553 -99
*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.
Summary
Adds a per-tensor
ragged_offset_multiplier(default1). It rescales a stored ragged offset to element units(
element_offset = stored_offset * multiplier), so a token-unit cumulative-seqlentensor (AITER's native format,
multiplier = H*D) can be bound directly as the raggedoffset with no conversion pass. Default
1preserves today's element-unit behavior forevery existing graph.
JIRA ID : ALMIOPEN-2626
Risk Assessment
Level 2. Additive, API surface with a schema/version-gated default that
preserves existing behavior byte-for-byte. No provider or kernel code is touched
(
dnn-providers/**untouched); the change is confined to hipDNN's frontend, backend,data_sdk, flatbuffers_sdk, and plugin_sdk. A new engine-plugin API floor (
1.4.0) isintroduced but only applies to graphs that opt in to a non-default multiplier.
ASIC Coverage
Arch-independent (no GPU kernel or provider dispatch change). Standard PR CI is
sufficient; no multi-arch sweep required.
Testing Summary
has_ragged_offset_multiplier(), validation (>= 1, requiresa ragged offset), gated lowering (only sent to the backend when non-default).
data_sdk:RaggedTensor/ShallowRaggedTensormultiplier scaling of addressing,sizing, and iteration; per-tensor multipliers sharing one offset aux (Q/O
Dmismatchcase); rejects multiplier
< 1.flatbuffers_sdk: JSON round-trip of the new field, including default-on-omission.1.4.0plugins for a multiplier graph and includes capable ones.
plugin_sdk: version-constant ordering/parsing (1.4.0dominates ragged's1.3.0).1.4.0for anon-default multiplier and the baseline for the default; deserialize ceiling
(
K_MAX_SUPPORTED_API_VERSION) updated and re-verified.Testing Checklist
All tests pass
Technical Changes
HIPDNN_ATTR_TENSOR_RAGGED_OFFSET_MULTIPLIER(1311), wired throughTensorDescriptorget/set andBackendEnumStringUtils.tensor_attributes.fbs:ragged_offset_multiplier: long = 1(participates in thecache key); regenerated
tensor_attributes_generated.h/cachekey_generated.h; JSONserialization updated.
TensorAttributes:set/get/has_ragged_offset_multiplier(), validation, andgated lowering in
DescriptorHelpers(only sent when non-default, for pre-1.4.0backend compatibility).
RaggedOffsetMultiplierversion gate:K_RAGGED_OFFSET_MULTIPLIER_MIN_VERSION = 1.4.0(new ceiling),
GraphDescriptor::hasRaggedOffsetMultiplier(), and a new bool argumentthreaded through both
computeMinimumEnginePluginApiVersioncall sites.utilities::RaggedTensor/ShallowRaggedTensor: newraggedOffsetMultiplierparameter(default
1);readElementOffset()centralizes thestored * multiplierscaling usedby addressing, sizing, and iteration.