Skip to content

GPU AMI auto-select broken: DetectGPUInstance misses g6e/g7/g7e; GPU AL2023 SSM param does not exist #356

Closed

Description

@scttfrdmn

Context

Filing from calque (github.com/spore-host/calque), which consumes spawn as a library and calls launcher.Provision with an empty LaunchConfig.AMI (letting spawn auto-select, via GetRecommendedAMI). On every GPU instance I tried (g7e.2xlarge, g6.2xlarge, us-west-2), auto-selection fails. Two distinct bugs.

Bug 1 — DetectGPUInstance misses newer GPU families

pkg/aws/ami.go DetectGPUInstance recognizes:

p5, p4, p3, g6, g5, g4, g5g, inf2, inf1, trn1

Missing: g6e, g7, g7e (and p6). So for a g7e.2xlarge it returns false and resolves a non-GPU AL2023 AMI — an instance that boots without GPU drivers. Silent wrong-AMI, not an error.

Bug 2 — the GPU AL2023 SSM parameter does not exist

For families it does detect as GPU (e.g. g6), GetAL2023AMI resolves:

/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-gpu-x86_64

That SSM public parameter does not exist (ParameterNotFound) — verified in us-west-2:

$ aws ssm get-parameter --name /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-gpu-x86_64
  ParameterNotFound
$ aws ssm get-parameter --name /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64
  ami-0b787142aa56d54db   # non-GPU resolves fine

AL2023 does not publish a -gpu- variant at that path. So Provision with an empty AMI on ANY correctly-detected GPU instance fails with ParameterNotFound before RunInstances.

Net: launcher.Provision cannot auto-select a working AMI for a GPU instance today — either it picks a non-GPU AMI (bug 1) or errors (bug 2).

Asks

  1. Add g6e, g7, g7e (and p6) to DetectGPUInstance.
  2. For GPU instances, resolve a real GPU-capable AMI. Options: the DLAMI SSM params (e.g. /aws/service/deeplearning/ami/x86_64/base-oss-nvidia-driver-gpu-amazon-linux-2023/latest/ami-id, which resolves), or the AL2 GPU AMI path, or document that GPU callers must pin LaunchConfig.AMI.
  3. Consider surfacing a clear error ("no GPU AMI for family X; pin AMI") instead of a raw ParameterNotFound, so consumers don't mistake it for a transient failure.

Interim (calque side)

Pinning LaunchConfig.AMI to a Deep Learning AMI (DL Base OSS NVIDIA, Ubuntu 22.04) — which also gives Docker + nvidia-container-toolkit for our container workload. Also hardened our retry classifier so ParameterNotFound is terminal (it was masquerading as a capacity wait and looping).

Not blocking us (pinning works), but auto-select is effectively unusable for GPU instances as-is.

/cc downstream: spore-host/calque

Activity

  1. added
    bug
    area:launch
    on Jul 15, 2026
  2. scttfrdmn commented on Jul 21, 2026

    @scttfrdmn
    ContributorAuthor

    Fixed by spawn#384, shipped in spawn v0.79.0 (this issue and #384 are the same two bugs; leaving #384 as the canonical reference).

    Both bugs from this report are resolved in pkg/aws/ami.go:

    • Bug 1 (family detection). DetectGPUInstance now recognizes g6e, g7, g7e, p6 (plus g4dn/p4de/p5e) — so g7e.2xlarge etc. no longer silently fall back to a CPU AMI. Matching is exact-family with explicit multi-letter entries (a g6 entry deliberately does not match g6e). Neuron (inf*/trn*) and AMD (g4ad) are correctly excluded.
    • Bug 2 (nonexistent SSM param). GPU auto-AMI no longer targets al2023-ami-kernel-default-gpu-{x86_64,arm64} (which never existed → ParameterNotFound). It resolves the Deep Learning Base OSS Nvidia Driver GPU AMI (AL2023) via the deeplearning SSM namespace (/aws/service/deeplearning/ami/{x86_64,arm64}/base-oss-nvidia-driver-gpu-amazon-linux-2023/latest/ami-id), which does resolve — so launcher.Provision with an empty AMI now works for GPU instances. (Ask 3's raw ParameterNotFound no longer occurs on the GPU path as a result.)

    Covered by TestDetectGPUInstance in pkg/aws/ami_test.go (includes g6e/g7e cases, green). /cc spore-host/calque — auto-select works for GPU now; pinning LaunchConfig.AMI remains valid if you want a specific DLAMI (e.g. Ubuntu + Docker + nvidia-container-toolkit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:launchbugtype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions