179 questions
No questions match those filters.
← All questions
LLMOps & ProductionHard· CUDA· Kernel Development· Fusion
Walk me through how you would implement a custom activa...
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 plansA custom fused CUDA kernel requires a two-part structure. The CPU wrapper handles device checks, contiguous checks, empty_like allocation, grid computation, and the kernel launch. The GPU kernel computes the global index, performs bounds checking, executes the activation function, and writes the output. Fusion is essential because it eliminates multiple HBM round-trips that a naive implementation would incur for every sub-operation.