Bruce Lee's Notes

Systems, programming, and engineering practice

A Function Name Cannot Hold Its Numerical Contract

Specify domains, approximations, precision, and axes beyond a function's name.

Series contents · Engineering and Delivery · 阅读中文版 “The function name is right, and the input shape is right. Why is the answer so different?” A colleague reduces the failing sample to two negative......

Same Output Shape, Different Answers: Pooling, Resizing, and Index Reductions

Let window denominators, sampling coordinates, and index rules determine actual results.

Series contents · Engineering and Delivery · 阅读中文版 “The shape, type, and memory size all match. Why are we still off by a pixel?” An investigator enlarges a feature map and notices a small discrepa......

It Only Moves Data. How Can It Still Be Wrong?

Preserve coordinates, strides, aliasing, and quantization when moving data.

Series contents · Engineering and Delivery · 阅读中文版 “This patch should be safe. It does no computation. It only moves data.” Half an hour later, downstream matrix multiplication returns different re......

An Instruction’s Four Identities: Why Code Generation Needs More Than Strings

Assign responsibilities and diagnostics across operation, kernel, emission, and encoding layers.

Series contents · Engineering and Delivery · 阅读中文版 “We are emitting one multiply instruction. Why does it need four layers?” Someone writes emit("mul", a, b, out) on the review whiteboard......

You Found the Operator’s Name. Does That Make It Supported?

Require evidence for a complete compilation path before calling an operator supported.

Series contents · Engineering and Delivery · 阅读中文版 A user sends a model graph: “You support this node, don’t you? I found it in the source.” The developer searches too. There is a definition, an in......

The Most Useful Words in an Operator Specification May Be “Not Yet Confirmed”

Keep unknowns explicit rather than turning example tables into capability promises.

Series contents · Engineering and Delivery · 阅读中文版 At a review, someone presents a polished diagram: an input tensor passes through an operator, and the output returns to memory. A few convincing a......

The Assembly Looks Right. Does That Mean the Machine Code Is Right?

Understand what pseudoassembly, assembly, machine code, and mathematical references each prove.

Series contents · Engineering and Delivery · 阅读中文版 “The generated assembly matches expectations, so the code generator is correct.” If the assembly printer and binary encoder are separate paths, th......

Why Does the Same Release Package Get a Different Hash Every Time?

Separate archive-event time, package timestamps, and byte reproducibility.

Series contents · Engineering and Delivery · 阅读中文版 “The source has not changed. The installation tree has not changed. Why does today’s archive have a different hash from yesterday’s?” The first su......

Compilation Failed. Why Is There Still a “Successful Model” in the Directory?

Make output directories, temporary artifacts, and stale files part of a clear success contract.

Series contents · Engineering and Delivery · 阅读中文版 A compilation succeeds in the morning. In the afternoon, someone changes the model and compilation fails. An automation script sees that the outpu......

Why Is Packing Compiler Outputs into One File Hard?

Treat a model file as a protocol with offsets, lengths, and ownership.

Series contents · Engineering and Delivery · 阅读中文版 “If we only want one file in the end, why not zip the whole directory?” That is a reasonable backup strategy, but not necessarily a loading protoc......