Quiz collegato alla guida · Medio Livello
Quiz sul linguaggio Triton per kernel GPU personalizzati
Esamina il modello kernel a livello di blocco di Triton, la gestione dei limiti mascherati, la configurazione di lancio e la necessità di una convalida delle prestazioni misurate.
Domanda 1 di 8
In che modo Triton descrive gran parte del lavoro della GPU rispetto a un kernel CUDA thread per thread?
Anteprima di ogni domanda8 domande
Le risposte e le spiegazioni vengono visualizzate mentre rispondi al quiz.
- In che modo Triton descrive gran parte del lavoro della GPU rispetto a un kernel CUDA thread per thread?
- As operations over logical blocks of elements
- As a single CPU instruction for the full tensor
- As one kernel per individual value
- As a SQL query over GPU memory
- Perché i kernel vettoriali mascherano il loro blocco finale?
- To force the last tile to launch fewer warps
- To prevent loads or stores beyond the valid tensor extent
- To pad the underlying tensor until its length is divisible by the block size
- To skip the entire final program instance when a partial block remains
- Cosa identifica comunemente tl.program_id?
- The GPU device ordinal that compiled the function
- The total number of warps in a program instance
- The index of the active logical program instance in the launch grid
- The element offset produced by tl.arange within that instance
- Perché un kernel a matrice piastrellata può ridurre il traffico di memoria?
- It reduces the mathematical number of output elements
- It eliminates every global-memory access
- It makes all matrices contiguous automatically
- It reuses loaded values across multiple calculations
- Cosa dovrebbe fare un benchmark con il tempo di compilazione JIT?
- Count compilation as device execution only
- Separate first-call compilation from steady-state kernel runtime
- Exclude all warmup and synchronization unconditionally
- Assume every shape uses the same compiled binary
- Why might a Triton kernel be slower than a library operation?
- Custom kernels cannot use memory tiling
- Triton always executes on a CPU
- The library may already use optimized kernels and launch overhead can dominate
- GPU kernels never benefit from fusion
- What can change numerical results between Triton and a reference implementation?
- The number of code comments
- The order of Python imports only
- The tensor's file name
- Floating-point operation order and precision
- When is a custom Triton kernel most defensible?
- Profiling identifies a bottleneck and a specialized operation can justify maintenance
- Before measuring any baseline
- Whenever a tensor contains more than one value
- When correctness tests are unavailable