179 questions
No questions match those filters.
← All questions
Inference & ServingHard· torch.compile· Compilation· Latency
You wrap the reranker’s forward pass in torch.compile,...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansWhen input shapes vary, torch.compile cannot reuse the cached graph and must retrace, which is computationally expensive. The solution is to enforce a fixed-size, padded, and masked layout so that there is exactly one shape for the compiler to handle. Reverting to eager mode is a common but suboptimal reaction; fixing the input shape is the correct path to realizing kernel fusion benefits.