← Questions

Matrix product scan with autograd and a hand-written backward

0
OpenAICodingLast asked Nov 2026

A coding interview question asked in OpenAI's agentic coding (beta) round, last asked Nov 2026. It tests pytorch, autograd and parallel scan.

You get N square matrices A[0..N-1], each D x D. Compute every inclusive prefix product Y[i] = A[0] @ A[1] @ ... @ A[i] as you would inside an automatic-differentiation framework: a forward pass, a hand-written backward pass that turns…

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 · Agentic coding (beta) · Last asked Nov 2026An existing codebase and changes too large to write by hand; you work through them with an AI coding agent · An AI coding agent is expected

What it tests

pytorch · autograd · parallel scan

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