Bruce Lee's Notes

Systems, programming, and engineering practice

Build a Dedicated Operator, Then Remove It: A Design Change Worth Recording

Compare the expressiveness and maintenance cost of a dedicated affine operator and its decomposition.

Series contents · Numerics and Quantization · 阅读中文版 “We were extending the dedicated operator last week. Why are we deleting it this week?” In a code review, the question can sound awkward. The use......

Just a Few Channel Parameters—So Why Is Local Memory Full?

Avoid materializing channel parameters across a whole tensor while preserving broadcasting.

Series contents · Numerics and Quantization · 阅读中文版 “The model has one tiny scale vector and one tiny bias vector. How can it run out of memory?” The allocation failure appears to be arguing with c......

Once BatchNorm Becomes Multiply-Add, the Numerical Work Begins

Follow fixed statistics through channelwise affine transforms, multipliers, shifts, and biases.

Series contents · Numerics and Quantization · 阅读中文版 “BatchNorm has already been folded into y=ax+b. Surely all that remains is a multiplication and an addition?” Everyone nods. Minutes later, the q......

The Multiplication Is Right; the Scale Is Wrong: An Integer Kernel’s Two Ledgers

Track input scales, output scales, and the range of the intermediate product.

Series contents · Numerics and Quantization · 阅读中文版 “The two integers multiply to exactly what the calculator says, but the model is still wrong.” Staring at the multiplication sign rarely helps he......

This Reduction Does Nothing—Why Can’t We Delete It?

A mathematical identity can still require a change of quantized representation.

Series contents · Numerics and Quantization · 阅读中文版 “Summing along an axis of length one returns the input. Delete it and save an instruction.” Mathematically, that sounds solid. In engineering ter......

Max, Min, and Sum: Similar Operators, Different Mathematical Homework

Share reduction structure without copying initialization, accumulation, or rescaling semantics.

Series contents · Numerics and Quantization · 阅读中文版 “We already have mean. For sum, remove the division; for max and min, change a symbol. Finished by this afternoon?” If an operator support list w......

The Vanishing Dimension: How keep_dims=false Can Break an Inverse Permutation

Preserve axis identity when dimensions disappear, then reconstruct the inverse permutation.

Series contents · Numerics and Quantization · 阅读中文版 “Everything passes when we keep the dimensions. Everything fails when we drop them.” It sounds like an unusually polite error message: it practic......

Just Take the Mean—Why Is the Compiler Writing Loops?

Lower arbitrary reduction axes into executable loops and account for layout and transfer costs.

Series contents · Numerics and Quantization · 阅读中文版 “The operator is one line: take the mean.” A colleague slides over a sheet of paper. It really does contain one line. Half an hour later, the whi......

Compiler Engineering Notes: 48 Bilingual Articles and Reading Paths

Numerics, operators, resources, and compiler delivery

阅读中文版目录 48 long-form articles on compiler numerics, layouts, scheduling, and delivery. The stories often start with a small question: why does computing a mean require moving data? Why can a progra......

ROS2 Fleet Coordinator V1: From Task Submission to Route Dispatch

ROS2

ROS2 Fleet Coordinator V1: From Task Submission to Route Dispatch ros2-fleet-coordinator does not start by solving advanced fleet optimization, conflict resolution, or full Nav2 integration. The fi......