Logo

Coding preview

GPU Command Pipeline Executor

What this preview is

About this preview

GPU Command Pipeline Executor is a hard quant coding problem on design patterns in Python, asked at Nvidia.

Unlock full access to getcracked

Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.

Building a GPU command pipeline with design patterns

This hard coding problem asks you to implement a simplified model of NVIDIA's internal GPU command-processing pipeline. It combines two classic design patterns — Command (encapsulating operations as objects) and Chain of Responsibility (passing requests through a sequence of handlers) — to test your ability to design extensible, modular systems under realistic constraints.

The core challenge is implementing three distinct pipeline handlers (validate, fuse, optimize) that transform a command list in sequence, then computing the critical path of the resulting dependency graph. You must handle command merging with careful state management, respect dependency constraints during scheduling, and return the total cycle cost of the longest dependent chain. Interviewers use this problem to assess whether you can reason about data-structure choices, implement stateful transformations correctly, and combine multiple algorithmic techniques (graph traversal, greedy scheduling) into a coherent solution.

  • Dependency graph analysis and critical-path scheduling
  • In-place list transformation with careful pointer/index management
  • Handler composition and the Chain of Responsibility pattern
  • Command fusion with type and dependency constraints