T0 Big tech Baidu
Baidu AI Infra (2)
Real Baidu AI Infra interview questions covering operator optimization
Operator optimization
Round 1
Theory
- Describe the GPU memory hierarchy and which levels are shared how.
- In OpenMP, how do you declare a parallel region? Give basic usage.
- In a parallel setting, does
for(int i=0;i<100;i++){sum++;}match serial results? How do you ensure correctness? - What cache-mapping categories exist, and what are their traits?
- Explain C++ smart-pointer types and when to use them.
- What is C++ polymorphism, and how is it implemented?
- What are dynamic linking and dynamic binding, and how do they differ?
Project deep dive
- Introduce resume projects and papers, and discuss related technical details.
- What did you mainly study in high-performance computing? Any experience with large-scale compute systems?
Round 2
Theory
- What is the underlying data structure of C++ STL map, and how does it work?
- How do AVL and red-black trees differ in balancing strategy, and what are their performance traits?
- How is unordered_map implemented underneath?
- What common ways resolve hash collisions?
- Introduce the computer storage hierarchy.
- Which programmer-visible register classes exist in a CPU? What does the program counter (PC) do?
- List OS commands you use often day to day.
Project deep dive
- Introduce resume projects and research work.
Round 3
Theory
- How do you run a custom function before main executes?
- How do you set a conditional breakpoint while debugging?
- How do you watch the call stack?
- How is a program laid out in memory segments?
- What is the internal mechanism of STL deque?
- Which is faster to access, registers or Cache? What tech implements Cache vs main memory? How do they compare?
- What CUDA memory categories exist?
- What is a CUDA Kernel? What does
__global__do? - How do you get the maximum thread count a GPU supports?
- Compare greedy algorithms and dynamic programming: ideas and when each fits.
- What common graph-search algorithms exist?