Convolution
Convolution is an operation that applies a filter or kernel across an input, combining values from local neighborhoods to produce output values.
Grokking GPU Programming
Convolution is an operation that combines input values with corresponding kernel weights over a neighborhood to compute outputs.
- How it is used
- Uses weighted stencils to connect image filtering with convolution layers in neural networks.
- How deep it goes
- Explains neighborhood indexing, weighted sums, boundary choices, parallel work, and in-place races using 1D and 2D stencils.
- Examples
- Uses a 3×3 Gaussian-style kernel, box blur, Sobel weights, and a 2D convolution practice problem.
- What you can do after
- Builds a weighted stencil in CUDA by multiplying neighborhood values by kernel weights and writing each result to a separate output array.
Graph Neural Networks in Action
Convolution is an operation that combines nearby values through a local filter or weighted aggregation to produce a transformed representation.
- How it is used
- Connects localized filtering with image recognition and graph neural networks for learning node representations.
- How deep it goes
- Defines filters, activations, pooling, spatial methods, and spectral methods without deriving the mathematical convolution operator.
- Examples
- Uses image kernels, pixel grids, graph neighborhoods, graph signals, and node prediction as concrete examples.
- What you can do after
- Apply convolutional GNNs to node prediction and interpret them as neighborhood-based representation learners.
Read how Graph Neural Networks in Action explains convolution →
CUDA for LLMs
A convolution is an operation that combines a local sliding filter with input data to produce transformed features.
- How it is used
- Processes local neighborhoods in signals and feature maps, supporting CNN workloads such as image processing.
- How deep it goes
- Defines the sliding dot product and traces a naive CPU/CUDA 1D implementation, without detailing optimized kernel internals.
- Examples
- Uses a sliding filter on signals, a 3 × 3 filter on a 1024 × 1024 image, and a CUDA 1D kernel.
- What you can do after
- Build a naive 1D CUDA kernel by assigning each output element to a thread that computes its filter dot product.
Also covered in
- Machines that ThinkIn early access (MEAP)
What to know first
- convolutional neural networkA convolutional neural network is a neural-network architecture that processes structured inputs with convolutional operations, typically using learned local filters to capture patterns.
- pixelA pixel is either a discrete image sample carrying visual information at a raster location or, in CSS, an abstract reference unit for rendered dimensions.
- transformer architectureA transformer is a neural-network architecture that uses attention-based interactions and position-wise transformations to model relationships among elements of sequences or other structured inputs.
Related concepts
- convolutional neural networkused by · A convolutional neural network is a neural-network architecture that processes structured inputs with convolutional operations, typically using learned local filters to capture patterns.
- convolution kerneluses · A convolution kernel is an array or tensor of weights applied to local regions of structured input to compute convolution responses.
- double bufferinguses · Double buffering is a technique that uses two buffers in alternating roles to keep data being read separate from data being written, often allowing data transfer and computation to overlap.
- mapcontrasts with · Map is an operation that applies a function to values in a collection or computational context and returns the results while preserving the structure or context.
- radiusconfigured by · A radius is a measure of distance from a center to the extent of a circular region or neighborhood, typically to its boundary or farthest included point.
Questions about convolution
What is convolution?
Convolution is an operation that applies a filter or kernel across an input, combining values from local neighborhoods to produce output values.
Which Manning books explain convolution?
Grokking GPU Programming, Graph Neural Networks in Action and CUDA for LLMs.
What should I know before learning convolution?
Manning books that teach convolution usually introduce convolutional neural network, pixel and transformer architecture first.
What is the difference between convolution and cross-correlation?
Convolution is an operation that applies a filter or kernel across an input, combining values from local neighborhoods to produce output values. Cross-correlation is a sliding-window operation that compares local segments of one signal or array with another without reversing the comparison operand.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


