Tensor Cores, Triton, residual networks and vision transformers

Illustrative 1980s CPU die detail, not a GPU.
Between 2015 and today, deep learning evolved from hand-tuned C++ GPU code and convolutional networks into hardware-accelerated matrix engines and Transformer architectures. These three milestones define how modern AI models are engineered and scaled.
1. Modern CUDA Evolution: Tensor Cores and OpenAI Triton
In 2012, Alex Krizhevsky wrote low-level CUDA C++ (cuda-convnet) to calculate individual floating-point operations across standard CUDA cores. Today, deep learning relies on specialized matrix hardware and high-level compilers.
- From CUDA Cores to Tensor Cores. Traditional CUDA cores perform one scalar multiplication and addition per clock cycle. Starting with the Volta architecture (2017), NVIDIA introduced Tensor Cores, which multiply entire small matrices (such as 4×4 or 16×16 blocks) in a single clock cycle. Modern Tensor Cores use mixed-precision formats like FP16, BF16, and FP8, delivering order-of-magnitude speedups for matrix multiplications.
- cuDNN and Automatic Kernel Selection. Instead of researchers writing custom C++ convolutions, NVIDIA’s cuDNN library now contains hundreds of pre-compiled assembly kernels. At runtime, frameworks like PyTorch benchmark different algorithms for your exact tensor shape and automatically pick the fastest Tensor Core routine.
- OpenAI Triton (Python-Based GPU Programming). Writing raw CUDA C++ requires manually managing thread indexing, shared memory bank conflicts, and warp synchronization. Released by OpenAI, Triton allows researchers to write high-performance GPU kernels directly in Python. You define operations at the block level (tiles of data), and the Triton compiler automatically handles memory coalescing, shared memory tiling, and Tensor Core scheduling—often matching or beating hand-tuned CUDA C++.
2. ResNet Skip Connections and Backpropagation Flow
Before ResNet (2015), stacking more than ~20 convolutional layers caused training error to spike. As gradients traveled backward through dozens of multiplication steps, they shrank toward zero (vanishing gradients) or became unstable.
- Learning Residuals Instead of Raw Outputs. In a standard network block, stacked layers try to learn a direct mapping H(x) from input x. ResNet introduces a skip connection (identity shortcut) that adds the original input x straight to the block's output:
y=F(x)+x
Here, F(x) represents the stacked convolutional layers. Instead of rebuilding the entire representation from scratch, the layers only need to learn the residual (the small adjustment F(x) = y - x). If a layer isn't needed, the network can easily push F(x) toward zero, leaving a clean identity pass-through.
- Uninterrupted Gradient Highway. During backpropagation, the chain rule computes the gradient of the loss (L) with respect to the input x:
(∂ L)/(∂ x)=(∂ L)/(∂ y)((∂ F(x))/(∂ x)+1)
Because of the + 1 term created by the identity shortcut, the upstream gradient ((∂ L)/(∂ y)) flows directly backward to earlier layers without being shrunk by small weight matrices in (∂ F(x))/(∂ x). This allows gradients to propagate cleanly through 100+ or even 1,000+ layers.
3. The Shift from CNNs to Vision Transformers (ViT)
For nearly a decade after AlexNet, Convolutional Neural Networks (CNNs) dominated computer vision by sliding small local filters across images. In 2020, Google introduced the Vision Transformer (ViT), adapting the Transformer architecture from natural language processing to images.
| Feature | Convolutional Neural Networks (CNNs) | Vision Transformers (ViT) |
|---|---|---|
| Input Processing | Processes the full 2D image grid using sliding filters (e.g., 3×3). | Splits the image into fixed-size patches (e.g., 16×16 pixels) and flattens them into a sequence of tokens. |
| Receptive Field | Local first. Early layers only see neighboring pixels; global context builds up slowly in deep layers. | Global immediately. Self-attention connects every image patch to every other patch right from Layer 1. |
| Inductive Bias | High. Built-in assumptions about translation invariance and 2D spatial locality help CNNs learn well on smaller datasets. | Low. Lacks built-in 2D spatial rules (relying on positional embeddings), requiring massive datasets to learn visual structure. |
| Hardware Scaling | Relies on specialized convolution kernels and complex memory access patterns. | Relies almost entirely on dense matrix multiplications (GEMMs), which saturate modern GPU Tensor Cores at maximum efficiency. |
- Why ViTs Took Over Modern AI. While CNNs remain efficient for lightweight mobile and edge devices, Vision Transformers scale much better when trained on hundreds of millions of images. Furthermore, because ViTs represent images as token sequences—the exact same format used for text and audio—they enabled modern multimodal AI models (like GPT-4o and Gemini) to process vision and language inside a single unified architecture.