Bruce Lee's Notes

Systems, programming, and engineering practice

The Compiler Moved. Its Lookup-Table Module Didn’t Get the Address

Use real functionality and missing-resource tests to validate relocation.

Series contents · Engineering and Delivery · 阅读中文版 The tool works in the development directory. Unpack its installation bundle somewhere else and convolution still works; several simple operators w......

The Library Is in the Package. Why Can’t the Program Find It?

Connect real library files, SONAMEs, linker names, and runtime search paths.

Series contents · Engineering and Delivery · 阅读中文版 “Just copy the missing shared library into the package.” Ten minutes later, loading still fails. The directory definitely contains libcompute.so.4......

One Version of the Headers, Another Version of the Generator

Headers, libraries, generators, and caches jointly determine toolchain identity.

Series contents · Engineering and Delivery · 阅读中文版 “I fixed the LLVM path. Why does the generated code still fail to compile?” The configuration log reports the right dependency directory. The comp......

“I Only Rebuilt It.” Why Did the Installation Directory Disappear?

Define the responsibilities and failure states of environment setup, builds, and installation.

Series contents · Engineering and Delivery · 阅读中文版 A colleague wants to verify a two-line change. They run the build script, and compilation fails halfway through. No disaster: use the previously i......

Debug Works, but Release “Optimizes Away” a Write

A required write hidden in an assertion disappears when checks are disabled.

Series contents · Engineering and Delivery · 阅读中文版 “The model compiles, but only the release build cannot find the newly generated constant.” That sentence can send an investigation down an expensi......

Fewer Operations—So Why Disable the Optimization?

Treat disabling an optimization as a design decision about slicing and quantization contracts.

Series contents · Resources and Scheduling · 阅读中文版 “Instead of multiplying the matrices and then taking a small slice, let’s slice the weights first and do a smaller multiplication.” “The equation ......

“I Parsed a Number” Does Not Mean the Input Is Valid

Check full input consumption, signs, and field ranges after parsing succeeds.

Series contents · Resources and Scheduling · 阅读中文版 “How did r7oops get past the register parser?” “The parser successfully read 7.” “What about the oops?” “It didn’t ask.” Many backend bugs arise n......

One More Loop, and the Binary Snapshot Looks Like a Different Program

Examine how loops, labels, and independent emitter instances affect binary determinism.

Series contents · Resources and Scheduling · 阅读中文版 “This test passed a moment ago. It still passes on its own, but the output changes after the rest of the suite.” “Could it be the random seed?” “T......

You Caught the Exception. What Happens to the Half-Written Machine Code?

After catching an error, account for the state and output already produced.

Series contents · Resources and Scheduling · 阅读中文版 “The exception is caught. The compiler won’t crash.” “Then why is only half the output directory there?” “Because another path writes the files.” ......

I Waited for the Event. Why Isn't the Data Ready?

Make synchronization events cover the actual production of data across execution engines.

Series contents · Resources and Scheduling · 阅读中文版 “I added a wait. How can it still read gate values that haven’t finished computing?” “Which event are you waiting for?” “A ready event.” “What act......