null
Loading... Please wait...
FREE SHIPPING on All Unbranded Items LEARN MORE
Print This Page

CUDA for LLMs (Building fast transformer kernels)

List Price: $69.99
SKU:
9781633434899
Quantity:
Minimum Purchase
25 unit(s)
  • Availability: Confirm prior to ordering
  • Branding: minimum 50 pieces (add’l costs below)
  • Check Freight Rates (branded products only)

Branding Options (v), Availability & Lead Times

  • 1-Color Imprint: $2.00 ea.
  • Promo-Page Insert: $2.50 ea. (full-color printed, single-sided page)
  • Belly-Band Wrap: $2.50 ea. (full-color printed)
  • Set-Up Charge: $45 per decoration
FULL DETAILS
  • Availability: Product availability changes daily, so please confirm your quantity is available prior to placing an order.
  • Branded Products: allow 10 business days from proof approval for production. Branding options may be limited or unavailable based on product design or cover artwork.
  • Unbranded Products: allow 3-5 business days for shipping. All Unbranded items receive FREE ground shipping in the US. Inquire for international shipping.
  • RETURNS/CANCELLATIONS: All orders, branded or unbranded, are NON-CANCELLABLE and NON-RETURNABLE once a purchase order has been received.
  • Product Details

    Author:
    Elliot Arledge
    Format:
    Paperback
    Pages:
    408
    Publisher:
    Manning (December 1, 2026)
    Imprint:
    Manning
    Language:
    English
    ISBN-13:
    9781633434899
    ISBN-10:
    1633434893
    Weight:
    15.84oz
    Dimensions:
    7.375" x 9.25"
    File:
    Eloquence-SimonSchuster_12032026_P10947896_onix30-20261203.xml
    Folder:
    Eloquence
    List Price:
    $69.99
    Pub Discount:
    37
    As low as:
    $66.49
    Publisher Identifier:
    P-SS
    Discount Code:
    H
  • Overview



    “A fundamental guide for CUDA and modern GPU architecture and their application in the field of AI.”
    —Bryce Adelstein Lelbach, NVIDIA


    The difference between a model that infers in milliseconds instead of seconds, or one that trains in days instead of weeks, is in how effectively you use your hardware. To squeeze every last teraflop out of an NVIDIA GPU, you need to write your own CUDA kernels, and this book will get you there! This book is a friendly hands-on tour of the modern GPU programming stack, written for the latest NVIDIA hardware, and grounded in fundamentals that will outlast any single generation of chips. In 408 fully-illustrated, code-rich pages, author Elliot Arledge guides you from your first kernel all the way to Flash Attention, tensor cores, and multi-GPU distributed training.

    GPU programming is complicated, so this book builds your skills one layer at a time using a six-level kernel optimization stack. You’ll start by writing a vector addition kernel, learning how grids, blocks, and threads map onto real hardware. From there, you’ll implement the naive versions of the kernels every deep learning model depends on: GEMM, softmax, 1D and 2D convolution, max pooling, and matrix transpose. Then you’ll build and train a full neural network in six progressively faster implementations and dig into cuBLAS, with backpropagation derived and coded from scratch.

    Throughout this book, your focus will stay on real optimization work. You’ll port a transformer to CUDA inference and attack each kernel in turn. Your GEMV decoder gets coalesced access, block-level reduction, and vectorization. Softmax becomes online, warp-shuffled, and fused. GEMM progresses through thread remapping, shared memory tiling, 1D and 2D blocktiling, and vectorized loads. Every optimization is profiled, and every profile is explained.

    The final chapters take you to the frontier. You’ll program tensor cores using the WMMA and WGMMA instruction sets for Hopper hardware and see how manual tiling gets replaced by hardware-managed data movement. You’ll implement Flash Attention with tiling and online softmax, quantize models, and explore scaling up to 16 GPUs with tensor and pipeline parallelism over NCCL. By the end, you’ll have both a portfolio of more than 50 working kernels and the mental models to write new ones for hardware that doesn’t exist yet.

    What's inside

    • CUDA and GPU programming from the ground up
    • Tensor and pipeline parallelism across multiple GPUs
    • PyTorch C++ extensions for shipping custom kernels

    About the reader

    For software and AI engineers comfortable with C/C++. No prior CUDA experience required.

    About the author

    Elliot Arledge is a GPU performance engineer and educator. Every kernel in this book comes from his workflow of writing, profiling, and verifying CUDA on both consumer and datacenter hardware. He created freeCodeCamp’s 12-hour CUDA course and consults on deep learning performance.