[release-1.14] Support vnpus.configs wrapper format for HAMi vNPU device config - #5770
Merged
volcano-sh-bot merged 4 commits intoJul 29, 2026
Conversation
Add backward-compatible support for the new HAMi vnpus.configs wrapper
struct format while preserving the legacy vnpus direct array format.
The HAMi/ascend-device-plugin shared ConfigMap now uses:
vnpus:
hamiVnpuCore: false
configs:
- chipName: 910A
...
But Volcano previously only parsed the old format:
vnpus:
- chipName: 910A
...
This adds a VNPUsConfig wrapper struct with a custom UnmarshalYAML
that probes the YAML node type (map vs array) to auto-detect the
format: maps are parsed as the new wrapper format, arrays as legacy.
Changes:
- Add VNPUsConfig struct with custom UnmarshalYAML in vnpu.go
- Change Config.VNPUs field type from []VNPUConfig to VNPUsConfig
- Update all consumer call sites to use .VNPUs.Configs
- Add tests for new wrapper, legacy array, and empty configs formats
Signed-off-by: Shivansh Sahu <sahushivansh142@gmail.com>
Signed-off-by: Shivansh Sahu <sahushivansh142@gmail.com>
Signed-off-by: Shivansh Sahu <sahushivansh142@gmail.com>
Signed-off-by: Shivansh Sahu <sahushivansh142@gmail.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Member
|
/approve |
Contributor
Author
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JesseStutler The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
This is an automated cherry-pick of #5399