Skip to content

Fix regex in partition_gpu to support MIG profiles with + and - suffixes after reboot - #631

Merged
ankitjoju-google merged 5 commits into
GoogleCloudPlatform:masterfrom
ankitjoju-google:fix-gpu-partition-regex
Aug 11, 2026
Merged

Fix regex in partition_gpu to support MIG profiles with + and - suffixes after reboot#631
ankitjoju-google merged 5 commits into
GoogleCloudPlatform:masterfrom
ankitjoju-google:fix-gpu-partition-regex

Conversation

@ankitjoju-google

Copy link
Copy Markdown
Collaborator

The regex used to parse nvidia-smi mig -lgi output was missing + and - in the character class for profile names, causing parsing to fail for extended MIG profiles (like +gfx or -me) when they already existed (aka after a reboot action). This led to incorrect state detection and failed attempts to recreate active partitions.

Added + and - to the character class and added unit tests. All passing

    The regex used to parse nvidia-smi mig -lgi output was missing + and -
    in the character class for profile names, causing parsing to fail for
    extended MIG profiles (like +gfx or -me) when they already existed.
    This led to incorrect state detection and failed attempts to recreate
    active partitions.

    Added + and - to the character class and added unit tests.
@ankitjoju-google
ankitjoju-google merged commit a3256e1 into GoogleCloudPlatform:master Aug 11, 2026
7 checks passed
@ankitjoju-google
ankitjoju-google deleted the fix-gpu-partition-regex branch August 11, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants