T0 Big tech Baidu
Baidu AI Infra (2)
Real Baidu AI Infra interview questions covering operator optimization
Operator optimization
Round 1
Project deep dive
- Introduce resume projects and papers, with follow-ups on the technical points involved
High-performance computing
- How do you open an OpenMP parallel region? (pragma omp parallel related syntax)
- Inside a parallel region, does
for(int i=0;i<100;i++){sum++;}match serial results? How do you keep consistency? - GPU memory hierarchy: roles/scopes of Register File, L1 Cache, Shared Memory, L2 Cache, Global Memory
Computer architecture
- Cache mapping types and traits (set-associative, fully associative, direct-mapped)
C++ basics
- Smart-pointer types and when to use each
- C++ polymorphism concepts and implementation (override vs overload)
- Dynamic linking vs dynamic binding
Round 2
Project deep dive
- Deep discussion around resume and projects
C++ basics
- What is the underlying data structure of STL map?
- Difference between balanced BST (AVL) and red-black trees
- How unordered_map is implemented underneath
- Common ways to resolve hash collisions
Computer architecture
- Computer storage hierarchy (registers, Cache, main memory, secondary storage)
- Which programmer-visible register classes exist in a CPU? What does the program counter (PC) do?
Other
- What common OS commands do you use?
Round 3
C++ basics
- How do you run a function before main executes?
- How do you set a conditional breakpoint while debugging?
- How do you watch the call stack?
- How a program is segmented in memory (code, data, heap, stack, etc.)
- How STL deque is implemented underneath
Computer architecture
- Which is faster, registers or Cache? What tech implements Cache vs main memory? How do they compare?
CUDA programming
- CUDA memory categories (local memory, global memory, etc.)
- What a Kernel is; role of the
__global__keyword - How do you get the maximum thread count a GPU allows?
Algorithms
- Greedy vs dynamic programming
- Common graph-search algorithms (BFS, DFS)