KatInterview

Design a GPU Test Pipeline in Jenkins Across Driver Matrices

System DesignModel answer
HardModel answerSystem Designjenkinsci-cdgpu

Last updated

Design a Jenkins-based CI system that builds a graphics stack and runs GPU tests across hardware, driver and OS combinations, with flake handling, gating and safe driver rollouts.

Your team maintains a graphics stack: a renderer, driver-facing libraries and a test harness. Many tests need a real GPU. You are asked to design a continuous integration system on Jenkins that builds the stack and runs these GPU tests across a matrix of GPU architecture, driver version and operating system.

Describe your design and cover the following areas:

  • Orchestration and pipeline-as-code: how jobs are defined, configured and reused across repositories.
  • Parallelization and test sharding: how a large suite gets fast feedback on scarce GPU hardware.
  • Artifact management: what gets stored, how it is versioned, and how long it is kept.
  • Retry policy: how you tell infrastructure failures apart from genuine test failures.
  • Flaky tests: detection, quarantine and the rules for leaving quarantine.
  • Notifications and promotion gates: who hears about what, and what must pass before a change is merged or released.
  • Driver updates and rollback: how to introduce a new driver version safely and revert it quickly if it causes problems.

State your assumptions about scale (commits per day, matrix size, number of tests, GPU node count, feedback-time targets) and explain how they shape the design. Discuss trade-offs, failure modes, and how you would roll out and validate the system itself.

Hints

Hint 1

Start by estimating sizes: matrix cells multiplied by test count multiplied by average test time gives total GPU-hours, which tells you whether sharding and a reduced pre-merge matrix are required.

Hint 2

Separate concerns: compile once on cheap CPU agents, publish an immutable artifact, and have GPU agents only pull and test. Treat GPU nodes as precisely labeled, health-checked, single-tenant resources.

Hint 3

Classify failures before retrying. Infrastructure faults (lost agent, GPU hang, fetch error) should reschedule the shard on another node and drain the bad one, while test failures should rerun only the failed tests, and every attempt must be recorded.

Hint 4

Treat a driver as a versioned dependency: pin it per node pool in git, canary it on a small pool, compare results against the baseline, and keep the previous node image ready for fast rollback.