General question bank
AI Infra mixed interview question bank (1)
Real AI Infra interview questions covering inference optimization, training optimization, operator optimization, and high-performance computing
Inference optimization Training optimization Operator optimization High-performance computing
Basics
- What are the advantages of TMA on Hopper? How do you invoke it? Does the data transfer go through the L1 cache?
- In FlashAttention v2, why does the outer loop iterate over Q? Roughly what share of time does Flash Decoding’s combine kernel take?
- How do you analyze the compute-to-memory ratio of MLA decode? Does that ratio depend on sequence length or batch size?
- Design ideas behind Mooncake’s KV-Cache-centric PD separation scheme
- How does a DiT inference framework compare with an LLM inference framework?
- Is knowledge distillation for large language models a good fit for the pretraining stage?
- What are the training and inference steps of a Diffusion Model? When inference sets
num_inference_stepsto 40, why does training still needtimestepsset to 1000? - Introduce dLLM (discrete large language models). How do they differ at a fundamental level from autoregressive (AR) models?
- How do
torch.repeatandtorch.expanddiffer in behavior and memory use? - What launch arguments does
torchruntake? On Linux, how do you kill all processes that involvetorchrunin bulk?
CUDA coding
- Implement 4D tensor elementwise multiply that supports torch broadcast semantics
- Given A: (1, 256), B: (256, 128), C: (128, 256), compute (A * B) * C
- Embedding Sparse Feature Pooling: A holds 1 million discrete IDs (range 0~999), B holds 1 million floats. Compute length-1000 array C where C[i] = sum of B[j] for all j with A[j] = i
PyTorch coding
- Implement a LoRA Adapter
Algorithms
- Implement a memory pool (support something like
new Foo[]/delete[]) - In C++, how do you compare two floats for equality?
- Implement an LRU cache
- Number of islands
- Level-order traversal of a binary tree
- Compute Hamming Weight
- K-Coverage Intervals