English NewsSunday, 15 November 2026
Latest

NVIDIA CUDA vs OpenAI Triton: A Modern Comparison of GPU Programming for AI

2026-11-15

Illustrative trapped-ion quantum computing apparatus, not a GPU or NVIDIA system.

Illustrative trapped-ion quantum computing apparatus, not a GPU or NVIDIA system.

A research-based review of programming models, performance and practical adoption

Research checked: 15 November 2026

Abstract

NVIDIA CUDA and Triton are often described as competing approaches to GPU programming: CUDA provides low-level control, while Triton provides a more accessible, Python-based way to write AI kernels. That description captures part of their history, but it is no longer sufficient.

CUDA is a broad computing platform with programming models, libraries, compilers and runtime facilities. Triton is an open-source language and compiler focused on efficient custom numerical kernels. Modern CUDA also includes tile-based programming through CUDA Tile, while NVIDIA’s CuTe DSL provides another Python-based approach to hardware-specialised kernels.

This article compares their abstractions, ecosystems, hardware support and engineering trade-offs. It proposes a way to evaluate performance rather than claiming a universal winner.

Keywords: CUDA, Triton, GPU programming, CUDA Tile, CuTe DSL, kernel fusion, AI infrastructure.

1. Why this comparison matters

AI performance depends on more than the number of processors or the size of a model. A powerful GPU can still spend substantial time waiting for data to move, launching small kernels, synchronising work or processing an inefficient memory layout.

The programming approach affects not only execution speed but also development time, portability, debugging and long-term maintenance. The useful question is therefore not simply “Which language is faster?” It is:

Which approach produces a correct, maintainable and efficient implementation for this workload, hardware and team?

2. CUDA and Triton are not equivalent categories

CUDA is NVIDIA’s parallel computing platform and programming model. Its scope includes GPU execution, memory management, device control and an extensive collection of libraries and tools. CUDA C++ is one way of writing kernels within that platform. NVIDIA CUDA Programming Guide

Triton is an open-source language and compiler for writing efficient numerical kernels, particularly for machine learning. Its research foundations predate OpenAI’s Triton 1.0 announcement in 2021; OpenAI built on work by Triton’s original creator. It is not a closed OpenAI service. OpenAI’s original Triton announcement

A fair analysis separates four comparisons:

1. CUDA C++ versus Triton as ways to express custom kernels.

2. CUDA Tile versus Triton as tile-oriented programming approaches.

3. The broader CUDA ecosystem versus Triton’s narrower language-and-compiler ecosystem.

4. Specific implementations measured on a specific workload.

Naming note: Triton the programming language is different from NVIDIA Triton Inference Server.

3. CUDA C++: explicit parallel execution

Traditional CUDA C++ commonly uses a single-instruction, multiple-thread model, or SIMT. A kernel is launched across a grid of thread blocks, and each thread can calculate which data it should process.

For example:

__global__ void add_cuda(
    const float* a, const float* b,
    float* output, int n)
{
    int i = blockIdx.x * blockDim.x + threadIdx.x;
    if (i < n) {
        output[i] = a[i] + b[i];
    }
}

A launch for a positive length could use 256 threads per block and enough blocks to cover the input. Allocation, error checking and synchronisation are omitted here for clarity.

CUDA C++ gives developers control over how threads cooperate, use memory and synchronise. This is useful for algorithms requiring specialised execution strategies, but the developer must also manage more implementation details. CUDA programming model

4. Triton: expressing computation in blocks

Triton uses Python-based syntax and a specialised language. Rather than explicitly assigning each element to a hardware thread, the programmer describes operations over a block of data. Triton’s compiler maps those operations onto GPU resources.

import triton
import triton.language as tl

@triton.jit
def add_triton(a, b, output, n, BLOCK: tl.constexpr):
    offsets = tl.program_id(0) * BLOCK + tl.arange(0, BLOCK)
    valid = offsets < n

    x = tl.load(a + offsets, mask=valid, other=0.0)
    y = tl.load(b + offsets, mask=valid, other=0.0)
    tl.store(output + offsets, x + y, mask=valid)

The Python syntax does not mean that ordinary interpreted Python performs each calculation on the GPU. The kernel is compiled. Also, BLOCK describes the elements assigned to a program instance; it is not simply a CUDA thread count under a different name. Triton vector-addition tutorial

These examples illustrate the programming models. They were not executed or benchmarked for this article.

5. Modern CUDA also supports tile-based programming

The statement “CUDA is thread-based, whereas Triton is tile-based” is now incomplete.

NVIDIA’s current CUDA documentation describes CUDA Tile, including a Python interface and CUDA Tile C++. Tile operations allow programmers to express work over blocks of data, with the compiler mapping the work onto hardware threads. The documentation also describes using tile and SIMT kernels in the same application. CUDA Tile C++ is documented from CUDA Toolkit 13.3 onward. CUDA Tile programming guide

This is an important change in the comparison. Tile-based programming is no longer distinctive to Triton; it is a broader response to the complexity of modern GPU hardware.

cuTile is not CuTe DSL

These similarly named technologies should not be confused:

  • - cuTile is the Python interface to CUDA Tile.
  • - CuTe DSL is a Python-based language associated with NVIDIA’s CUTLASS ecosystem, designed for layout-aware and hardware-specialised kernels.

Both use Python syntax, but their programming models and intended use are different. Python syntax alone does not determine how much hardware control a developer has. NVIDIA CuTe DSL documentation

6. What Triton automates, and what engineers still decide

Triton can reduce the amount of explicit thread coordination needed for tensor-oriented computations. It does not eliminate engineering decisions.

A developer still needs to consider:

  • - Tile sizes and program organisation.
  • - Contiguous versus strided memory access.
  • - Data reuse and cache behaviour.
  • - Register pressure and resource limits.
  • - Input shapes and boundary handling.
  • - Numerical precision and acceptable error.

Triton’s own matrix-multiplication tutorial discusses tile dimensions, cache-aware ordering and configuration tuning. Performance is therefore a design and measurement problem, not an automatic guarantee. Triton matrix-multiplication tutorial

In particular, it would be misleading to say that Triton always matches expert CUDA, always reaches peak bandwidth, or automatically uses Tensor Cores for every operation. Elementwise vector addition, for example, is not matrix multiplication merely because it is written in Triton.

7. Hardware support and portability

At the time of this review, the upstream Triton repository lists Linux, NVIDIA GPUs with compute capability 8.0 or newer, and AMD GPUs with ROCm 6.2 or newer. It lists CPU support as under development. Support can change, and a listed device does not guarantee identical support or performance for every operation and data type. Triton compatibility information

It helps to distinguish three kinds of portability:

1. Source portability: similar code can compile on another target.

2. Functional portability: it produces the intended result.

3. Performance portability: it remains efficient on that target.

A kernel that runs on two GPU architectures may still need different tile sizes or tuning to perform well on each.

CUDA is fundamentally NVIDIA’s platform. CUDA Tile’s abstraction of hardware details should not be mistaken for a promise that CUDA Tile targets every vendor’s GPUs.

8. The wider CUDA ecosystem

CUDA’s practical value goes well beyond handwritten kernels.

  • - cuBLAS and cuBLASLt provide established linear-algebra and configurable matrix-multiplication implementations. They are important baselines when evaluating custom code. NVIDIA cuBLAS documentation
  • - cuDNN provides optimised deep-learning operations, with support depending on the operation, software versions and hardware. NVIDIA cuDNN overview
  • - NCCL provides multi-GPU communication operations, including AllReduce, AllGather and ReduceScatter. A fast local kernel does not replace a distributed communication layer. NCCL documentation

Using Triton for selected kernels does not necessarily mean abandoning NVIDIA libraries or the CUDA platform. An application may combine framework-generated kernels, vendor libraries and custom Triton or CUDA components.

9. Triton and PyTorch

Triton is relevant both to developers who write kernels directly and to framework compilation. PyTorch documents ways to integrate user-defined Triton operations with torch.compile, including torch.library.triton_op. PyTorch’s user-defined Triton tutorial

Production integration, however, requires more than accepting tensors as input. A team should examine supported devices and layouts, shape changes, recompilation, operator registration, numerical tolerances and deployment requirements.

For training, a custom forward kernel is not automatically a complete operator: gradient behaviour must also be implemented or supported and tested.

10. What determines performance?

A useful conceptual model is:

Attainable throughput ≲ minimum of:

  • - the processor’s compute ceiling; and
  • - memory bandwidth multiplied by arithmetic intensity.

Arithmetic intensity is the amount of useful arithmetic performed relative to the data transferred. Profiling tools such as NVIDIA Nsight Compute can help identify whether a workload is limited more by compute, memory or other factors. Nsight Compute profiling guide

For a simple float32 vector addition, each element involves approximately two four-byte reads, one four-byte write and one addition. Ignoring cache effects, that is roughly one operation per 12 bytes transferred. It is therefore mainly a data-movement and overhead test, not a useful demonstration of Tensor Core matrix-multiplication performance.

Matrix multiplication, attention, reductions and irregular indexing have different constraints. A result for one operation cannot establish a universal performance ranking.

11. Kernel fusion and FlashAttention

Kernel fusion combines operations to reduce intermediate data transfers and launch overhead. It can be applied in either CUDA-oriented or Triton-oriented implementations.

FlashAttention is an important example of an IO-aware algorithm. It tiles attention computation and avoids materialising the full attention matrix in GPU high-bandwidth memory. The underlying strategy is not exclusive to one language. It reduces intermediate storage and memory traffic; it does not eliminate the quadratic arithmetic of exact dense attention. Original FlashAttention paper

Triton provides a fused-attention tutorial. The official FlashAttention project also documents implementations using other technologies, including CuTe DSL. FlashAttention repository

This matters for fair comparison: comparing a fused Triton implementation with a deliberately unfused CUDA implementation measures an algorithmic difference as well as a language difference.

12. How to conduct a fair benchmark

The following is a proposed research methodology, not an experiment performed for this article.

Select representative workloads

Test elementwise operations, reductions, normalisation, matrix multiplication, attention and at least one operation representative of the intended application. Include realistic input shapes and boundary cases.

Verify correctness first

Compare outputs against an appropriate reference. Test non-multiple tile sizes, relevant layouts and numerical precision. For training, compare gradients as well as forward results.

Separate start-up from steady state

Report compilation and autotuning separately from warmed execution. Both may matter in production, particularly when a service frequently encounters new shapes.

Compare credible baselines

Include relevant framework and vendor-library implementations, not only a simplistic handwritten kernel. Record the GPU model, software versions, precision, kernel configuration and measurement method.

Measure the whole application

A faster kernel does not necessarily yield the same improvement in end-to-end performance. For example, if a component originally consumes 30% of runtime and is made twice as fast, total speedup is:

1 ÷ (0.7 + 0.3 ÷ 2) ≈ 1.18, or approximately 18%.

The remaining 70% is unchanged. NVIDIA likewise recommends profiling and optimising measured bottlenecks iteratively. CUDA Best Practices Guide

13. Debugging and maintenance

Higher-level syntax does not prevent incorrect masks, invalid memory access or numerical errors. Triton documents debugging facilities including assertions, an interpreter and use of NVIDIA Compute Sanitizer; each has limitations, and compiled GPU execution still needs testing. Triton debugging documentation

For either approach, a production kernel should have:

  • - A clear specification and reference implementation.
  • - Correctness and regression tests across representative shapes.
  • - Documented precision and tolerances.
  • - Explicit hardware and software requirements.
  • - Performance tests and a fallback where appropriate.
  • - An owner responsible for maintenance as dependencies change.

A small speed improvement may not justify a fragile implementation that is difficult to support.

14. Which should an organisation choose?

Start with established libraries and framework compilation when they already meet the requirement. Custom kernels have an ongoing maintenance cost.

Consider Triton for custom tensor operations, fusion and rapid experimentation, especially in a Python-centred AI team.

Consider CUDA C++ when explicit low-level execution control, native code integration or specialised hardware interactions are important.

Consider CUDA Tile when a tile-oriented NVIDIA workflow fits the team and the relevant toolkit and hardware are supported.

Consider CuTe DSL for suitable layout-aware, hardware-specialised numerical kernels. Assess it separately from cuTile and Triton.

For many organisations, the best solution is a combination: vendor libraries for standard operations, Triton for selected custom kernels, and lower-level CUDA or CuTe components where profiling justifies them.

Conclusion

Triton has made custom GPU kernel development more accessible for many tensor-oriented AI workloads. CUDA remains a broader platform with extensive libraries, tools and execution facilities.

The distinction has evolved: modern CUDA offers tile-based interfaces, while Python-based GPU programming can expose either high-level operations or detailed hardware control. The old contrast between “manual CUDA” and “automatic Triton” is too simple.

Neither approach guarantees the fastest result. The right choice depends on the algorithm, hardware, input shapes, numerical requirements, engineering skills and maintenance costs.

The most reliable strategy is to choose the most productive abstraction that meets the workload’s requirements, verify correctness, compare against credible baselines and use lower-level control where measurements justify it.

Research note: This is a technical review and proposed benchmark methodology, not a report of new experiments. I consulted original publications and official NVIDIA, OpenAI, Triton and PyTorch documentation. I did not run GPU benchmarks or use SciSpace, Scite.ai, NotebookLM, Elicit or Julius AI for this article.

More AI technology news