ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Writing TPU Kernels in Pallas: Matmul on the MXU (from 12 to 140 TFLOPS)

JAX

Pallas

Google TPU

TPU kernel

Matrix Multiplication

Matmul kernel

TPU v5e

Mosaic compiler

LLM optimization

GPU kernels

JAX Pallas tutorial

MXU

Matrix Execution Unit

high performance computing

deep learning compilers

Bielik LLM

Triton vs Pallas

custom autotuner

hardware acceleration

ML performance architecture

low-level optimization

SpeakLeash

Автор: Qooba

Загружено: 2026-09-26

Просмотров: 284

Описание: From 12 TFLOPS to matching native XLA at 140 TFLOPS: How do you build an efficient Matrix Multiplication (Matmul) kernel for Google TPUs using JAX and Pallas?

In Episode 2 of the Bielik on TPU series, we leave memory-bound kernels behind and dive straight into compute-bound workloads on the TPU's Matrix Execution Unit (MXU). We walk through mapping LLM projections (QKV, Output, LM Head), writing the reduction loops in Pallas with @pl.when guards, managing on-chip VMEM accumulator scratchpads, and building an automated grid autotuner to unlock peak hardware throughput.

Code Repository & Benchmarks: https://github.com/qooba/bielik-on-tpu

Timestamps:
0:00 - Introduction: Shifting to Compute-Bound on the MXU
0:42 - Matmul in LLM Architectures (Bielik Anatomy)
1:35 - Implementing the Baseline Matmul Kernel in Pallas
3:15 - Handling Tiling Boundaries & VMEM Accumulators
4:40 - First Benchmark: Why Naive Pallas Hits a 12 TFLOPS Wall
6:10 - Hand-Rolling an Autotuner for Pallas & Mosaic
7:45 - VMEM Pre-filtering & Hardware Alignment (8/128 constraints)
8:55 - Autotuned Benchmark: Cracking 140 TFLOPS on TPU v5e
10:15 - Next Episode: Deep-Dive Hardware Profiling with jax.profiler

Key Takeaways:
Hardware Alignment: Mosaic requires strict alignment to avoid hardware stalls.
VMEM Budgeting: Pre-filtering scratchpads under a 15MB limit prevents compile-time out-of-memory errors on TPU v5e / v5 lite.
Tile Geometry: Why compute logic is only half the battle on TPUs - tile geometry determines whether the MXU is saturated or starved.

If you enjoy bare-metal accelerator programming, low-level ML systems, and custom kernel engineering, consider subscribing!

#JAX #GoogleTPU #Pallas #MachineLearning #DeepLearning #LLM #GPUComputing #HighPerformanceComputing

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Writing TPU Kernels in Pallas: Matmul on the MXU (from 12 to 140 TFLOPS)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]