Optimize a compute kernel with a simulator
AnthropicSoftware Engineer · OnsiteLast updated
This question evaluates performance engineering and low-level kernel optimization competencies, including profiling, data-layout and instruction-level techniques, correctness verification, and benchmark-driven measurement within the System Design domain.
You're given a compute kernel and a cycle-accurate simulator that verifies functional correctness and reports runtime. Within two weeks, achieve the largest speedup without changing outputs. Describe your end-to-end plan: establish a baseline, profile to find bottlenecks, form hypotheses, choose data-layout transformations, use bitwise operations and hashing where helpful, and apply VLIW-style instruction scheduling to exploit instruction-level parallelism. Explain how you validate correctness after each change, avoid overfitting to the simulator, and quantify speedup improvements. Prioritize the first three optimizations you would try and justify them.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.