Day 5/42 — Phase 1: ONNX one-on-one fundamentals
Objective
Read an ONNX graph topologically and identify producer-consumer edges, branches, residual paths, and dead values.
Concept
In topological order, every node appears after the nodes producing its inputs. A value can feed multiple consumers, creating a branch. Residual blocks preserve an earlier value and later merge it with a transformed path using Add. A dead value has no path to a graph output and should normally be removed before TensorRT engine construction.
Tasks (40–50 minutes)
Deliverable
Add a comment to this issue containing a one-page graph trace with:
- the ordered operations
- producer → consumer edges
- both residual branches
- a two-sentence explanation of the hypothetical dead RoPE
Gather values
Do not modify Mobius for this lesson.
Verification
Starting from the graph outputs hidden_states and present_key_value, trace backward through your diagram:
- every listed live value must reach an output
- each producer must appear before its consumer
- the hypothetical discarded
Gather output must not reach an output
Completion criteria
The trace is topologically ordered, identifies both residual branches and their merge points, and correctly distinguishes live values from dead values.
Robotics relevance
Removing dead work and understanding residual dependencies helps TensorRT produce smaller, more predictable engines for latency-sensitive robot perception and control loops.
Day 5/42 — Phase 1: ONNX one-on-one fundamentals
Objective
Read an ONNX graph topologically and identify producer-consumer edges, branches, residual paths, and dead values.
Concept
In topological order, every node appears after the nodes producing its inputs. A value can feed multiple consumers, creating a branch. Residual blocks preserve an earlier value and later merge it with a transformed path using
Add. A dead value has no path to a graph output and should normally be removed before TensorRT engine construction.Tasks (40–50 minutes)
ruiren/tensorRT-mobius.src/mobius/components/_decoder.py, focusing on_forward_pre_norm().hidden_states → RMSNormalization → Attention, alongside the bypassedresidual, ending at the firstAdd.hidden_statesis both saved asresidualand sent through normalization.src/mobius/models/base.pyaroundTextModel.forward(). Explain why discarded RoPEGatheroutputs would be dead values in the fused-GQA path and how direct use ofcos_cacheandsin_cacheavoids creating them.src/mobius/components/_decoder_test.py::test_residual_connectionsand relate its “at least twoAddnodes” assertion to your diagram.Deliverable
Add a comment to this issue containing a one-page graph trace with:
GathervaluesDo not modify Mobius for this lesson.
Verification
Starting from the graph outputs
hidden_statesandpresent_key_value, trace backward through your diagram:Gatheroutput must not reach an outputCompletion criteria
The trace is topologically ordered, identifies both residual branches and their merge points, and correctly distinguishes live values from dead values.
Robotics relevance
Removing dead work and understanding residual dependencies helps TensorRT produce smaller, more predictable engines for latency-sensitive robot perception and control loops.