MODULE 03 · LESSON 05
Profiling and debugging
Profiling records where runtime time went. Debugging links a symptom to that evidence.
PLAIN-LANGUAGE INTRODUCTION
What is this?
Profiling records where runtime time went. Debugging links a symptom to that evidence.
One simple example
An illustrative trace shows MatMul=12 ms, Add=1 ms, Custom=80 ms, and Copy=7 ms.
What goes in?
A representative model run with profiling and useful logging enabled.
What comes out?
Timed events, provider placement, shapes, and warnings.
Why does it matter?
Recorded evidence points toward the operation worth investigating first.
What is it not?
One illustrative trace is not a production benchmark.
WORK THROUGH THE IDEA
See the idea in more detail
- First define the symptom. Here, one illustrative run totals
100 ms. - The trace assigns
12 msto MatMul,1 msto Add,80 msto Custom, and7 msto Copy. - The custom operation uses
80%of this made-up total. Inspect its provider and input shape first. - Repeat warm runs under controlled conditions before making a performance claim.
- Common mistake: optimizing the largest-looking graph node without checking its recorded duration.