NVIDIA Principal coding interview questions
These are the 3 coding questions YourAlly has tagged for NVIDIA at Principal. Principal is the common India title for this level. YourAlly treats it as Staff (E6), the same level as Google L6, Meta E6 and Amazon L7.
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 interviewers also expect clean code quickly and edge cases you raise before they do.
Practice a mock NVIDIA 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 Principal rounds
- Behavioral 26 questions
NVIDIA coding at other levels
- SDE-3 6 questions
- Senior Principal 3 questions
Other companies at this level
- Adobe Principal 4 questions
- Amazon Principal 6 questions
- Apple Principal 7 questions
- Cisco Principal 3 questions
- Google Principal 14 questions
- IBM Principal 3 questions