Skip to content

feat: set AcceleratorType for GPU sizes that lack it in the name - #43

Merged
Matthew Christopher (matthchr) merged 1 commit into
Azure:mainfrom
blanquicet:jose/accelerator-type-map
Sep 2, 2026
Merged

Matthew Christopher (matthchr) merged 1 commit into
Azure:mainfrom
blanquicet:jose/accelerator-type-map

Conversation

@blanquicet

Copy link
Copy Markdown
Member

Fixes #38

AcceleratorType is parsed out of the size name, so it comes back nil for GPU sizes whose name has no accelerator part. That matters because Series alone doesn't identify the chip: ND96isr_H100_v5 and ND96isr_H200_v5 both give NDisr_v5. Series + AcceleratorType is the pair that identifies a GPU, and it doesn't work when one of them is nil.

The SKUs API doesn't have this data. I checked before writing the map (details in #38 (comment)).

What this adds: a lookup consulted only when the regex finds no accelerator, so no size that already resolves can change value.

Series Sizes GPU
NCs_v3 / NCrs_v3 NC6s_v3, NC12s_v3, NC24s_v3, NC24rs_v3 V100
NDrs_v2 ND40rs_v2 V100
NDasr_v4 ND96asr_v4 A100
NVs_v3 NV12s_v3, NV24s_v3, NV48s_v3 M60
NVas_v4 NV4as_v4, NV8as_v4, NV16as_v4, NV32as_v4 MI25

The lookup strips a _Promo suffix so promo variants resolve like the base size. There are none for these series today, but the regex already handles promo GPU sizes and the two shouldn't disagree.

Applied to both modules. The map is duplicated in vmsize.go and v2/vmsize.go, matching how the rest of the package is kept in sync.

On the counts. 19 sizes have a GPUs capability and a nil AcceleratorType. Three are NP-series, which the SKUs API reports under GPUs but which are actually Xilinx FPGAs, so they're out of scope. That leaves the 16 GPU sizes from the issue.

This covers 13 of them. The remaining 3 are NV6s_v2, NV12s_v2 and NV24s_v2: the NVv2 Learn page is gone, the retirement notice doesn't name the chip, and I found no other source that does, so I left them out rather than guess. Happy to add them if someone can confirm the GPU.

AcceleratorType is parsed out of the VM size name, so it is nil for the
GPU sizes whose name has no accelerator part. Series alone does not
identify the chip: ND96isr_H100_v5 and ND96isr_H200_v5 both give
NDisr_v5, so Series + AcceleratorType is the pair that does, and it
breaks when one of them is nil.

The SKUs API cannot fill the gap. It exposes a GPU count but no model.
Some family strings embed the chip, but not for these sizes, and the
format is inconsistent across families, so parsing it would cover one
of the affected sizes and add a second thing to keep working.

Add a lookup consulted only when the regex finds no accelerator, so no
size that already resolves can change. Covers 13 sizes over 6 series,
values taken from the per-series pages on MS Learn. NVs_v2 is left out
because its page is gone and no other source gives the chip.

The lookup strips a _Promo suffix so promo variants resolve like the
base size. There are none for these series today, but the regex already
handles promo GPU sizes and the two should not disagree.

Applied to both modules.
@matthchr
Matthew Christopher (matthchr) merged commit 58ba0e9 into Azure:main Sep 2, 2026
2 checks passed
@blanquicet
Jose Blanquicet (blanquicet) deleted the jose/accelerator-type-map branch September 2, 2026 21:38
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.

AcceleratorType is nil for GPU sizes that do not have the accelerator in the name

2 participants