Gids-gekoppelde quiz · Middelmatig Niveau
Triton-taal voor aangepaste GPU-kernelsquiz
Bekijk het kernelmodel op blokniveau van Triton, de afhandeling van gemaskeerde grenzen, de startconfiguratie en de behoefte aan gemeten prestatievalidatie.
Vraag 1 van 8
Hoe beschrijft Triton veel GPU‑werk vergeleken met een thread‑per‑thread CUDA‑kernel?
Bekijk elke vraag8 vragen
Antwoorden en uitleg verschijnen terwijl je de quiz doet.
- Hoe beschrijft Triton veel GPU‑werk vergeleken met een thread‑per‑thread CUDA‑kernel?
- 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
- Waarom maskeren vector‑kernels hun laatste blok?
- 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
- Wat identificeert tl.program_id meestal?
- 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
- Waarom kan een getegelde matrix‑kernel het geheugenverkeer verminderen?
- 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
- Wat moet een benchmark doen met JIT‑compilatietijd?
- 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