NVIDIA Senior Principal coding interview questions
These are the 3 coding questions YourAlly has tagged for NVIDIA at Senior Principal. Senior Principal is the common India title for this level. YourAlly treats it as Senior staff, the same level as Google L7, Meta E7 and Amazon L8.
A coding round at a large tech company usually runs 45 to 60 minutes with one or two problems. You write code that runs, test it on your own examples and state its time and space cost. At this level coding is often a smaller part of the loop, but the bar for clarity and speed stays high.
Practice a mock NVIDIA Senior Principal coding loopPractice NVIDIA coding questions
Pipeline Stages Under a Memory CapFree to read
A model's layers must be split, in order, into at most num_gpus contiguous stages, one stage per GPU. Each stage's total memory must fit mem_cap. Minimize the slowest stage's total compute time and return it, or -1 if no valid split exists.
Input: layer_times = [6,1,1,1], layer_mem = [1,1,1,4], num_gpus = 2, mem_cap = 4 Output: 8
What a strong answer covers
- Binary search on the bottleneck value
- Greedy feasibility check enforcing time and memory together
- Argument for why greedy packing is optimal
- Early -1 for a layer larger than mem_cap and for memory-forced splits
- O(n log S) complexity
2 more coding questions
- Buddy Allocator for Device Memory Locked
- Dynamic Batcher Completion Times Locked
Related pages
More NVIDIA Senior Principal rounds
- Behavioral 4 questions
NVIDIA coding at other levels
Other companies at this level
- Adobe Senior Principal 4 questions
- Amazon Senior Principal 6 questions
- Apple Senior Principal 7 questions
- Cisco Senior Principal 3 questions
- Google Senior Principal 14 questions
- IBM Senior Principal 3 questions