Katkat

Optimize a compute kernel with a simulator

AnthropicSoftware Engineer · Onsite

Last 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.