Two programs give the same result, yet their run times differ. Change the input, and the version that was ahead may fall behind. At that point, continuing to make the code shorter may not explain what is happening.
The questions need to be more specific: is the time going into computation or into moving data? Are you measuring the time the GPU actually needs to finish the work, or the time the CPU takes to issue the tasks?
EvoClass's AI023 "Introduction to Triton Programming: A Practical Tutorial" places these questions along a learning path that runs from simple operators to performance optimization. The course suits readers who already have a foundation in Python, array or tensor operations and want to go on to understand GPU programs.
Start with a small operator and find the boundaries of correctness
Vector addition looks simple: add the numbers at corresponding positions in two arrays. Once the work is split into multiple blocks and processed in parallel, however, it must be made explicit which segment each program instance is responsible for, and whether the final block crosses the array boundary.
Lesson 5, "Implementing Your First Kernel: Vector Addition" works as a practical starting point. The focus here is not only writing the addition expression, but also understanding blocking, position calculation and boundary handling.
Triton's official vector addition tutorial likewise places result verification and performance comparison after the basic implementation. Choosing a trustworthy reference result first, then checking your own implementation, is the precondition for later optimization.
It is especially worth trying input lengths that do not divide evenly. An example that runs successfully when the blocks are filled exactly does not prove that the tail shorter than one block is handled correctly.
Then confirm what the timing is actually measuring
In a performance experiment, a single impressive number is not enough.
GPU work is usually executed asynchronously. If you only read CPU time before and after issuing the tasks, you may not have waited for the device to actually finish the computation; the first run may also include compilation and preparation. When comparing two versions, the input size, data type, device and software environment also need to match.
Lesson 6, "Performance Foundations: Occupancy and Benchmarking" discusses timing protocols, throughput, data access and parameter selection together. It turns "this run was fast" into a more reviewable description: under what conditions, measured how, and does the result recur?
While learning, keep a simple record: input size, runtime environment, correctness checks and measurement method. Without these conditions, a speed number is hard for others to interpret and hard to use when guiding your own next change.
Beyond doing less arithmetic, you can also move data fewer times
Sometimes the limiting factor is reading and writing data back and forth.
Softmax offers a concrete example: if computing the maximum, subtracting the maximum, the exponential calculation, the sum and the normalization are executed separately, intermediate results may need to be written back and re-read several times. Combining steps that suit merging into a single operator can reduce these round trips.
Triton's official Fused Softmax tutorial uses specific matrix rows that fit in on-chip storage to illustrate the benefit of fusion, and it also makes the applicable conditions clear. This example demonstrates one kind of optimization opportunity; it does not imply that all inputs, all devices or all fused implementations will be faster.
The later lessons of AI023 extend to reductions, numerical stability, matrix multiplication and operator fusion. By this point, besides asking "how many read/writes were removed," you should also keep checking error and boundaries: a performance improvement must not come at the cost of quietly changing the computation result.
Make every optimization answer a clear question
A good small experiment to start with is to keep the input and environment fixed and change only one parameter or one way of organizing the data. Write down the expectation first, then measure; if the result is the opposite, go back to bottleneck analysis rather than rushing to look for another, larger parameter.
The block-size comparisons, verification and tuning content in the course can help organize such a process. Nothing here reports measured speedup figures for EvoClass, and nothing promises that finishing the course will necessarily improve a given model's performance by any particular amount.
The course content is currently in English. Reading the course materials and running GPU experiments on your own machine are two different things; hands-on practice requires a compatible hardware and software environment, and specific installation requirements should follow the official documentation for the Triton version you use.
Start from the course overview with vector addition or performance foundations, and leave a reviewable record for your first experiment. That way, the next time you see "faster," you can go on to explain where it is faster, why, and under what conditions that holds.