← Questions

Sharded matrix multiply: forward, backward and planted bugs

0
OpenAICodingLast asked Jul 2026

A coding interview question asked in OpenAI's onsite coding round, last asked Jul 2026. It tests distributed training, backpropagation and debugging.

Take one linear layer, Y = X @ W, with X of shape (B, D) and W of shape (D, H), and train it on P devices. W is sharded by output columns: device p holds W_p of shape (D, H/P) (H divisible by P).

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • OpenAI · Onsite coding · Last asked Jul 202660 min · Live coding; the problem often rebuilds a familiar system in several parts · No AI

What it tests

distributed training · backpropagation · debugging

Your code and the AI tutor open when you unlock this question.