# Agent brief: Read Instruments from the chip up

- **Lesson id:** 02-instruments-from-silicon
- **Goal:** Teach profiling as evidence from a real Apple-silicon device, keeping preparation apart from repeated inference.
- **Prerequisites:** Complete 01; know the original course profiling lesson.
- **Inputs:** Xcode 27 beta, real device, Core AI trace, GPU and ANE tracks.
- **Outputs/artifacts:** Phase model for Specialization, Load, Setup, and Inference; bottom-up trace diagnosis.
- **Concrete steps:**
  1. Require a real-device trace and name the four phases.
  2. Read GPU and Neural Engine tracks as evidence, not simplistic labels.
  3. Diagnose reload-on-every-tap as a preparation lifecycle break.
  4. Point slow inference toward graph support, shapes, and runtime assumptions.
  5. Link the original profiling lesson and next runtime lesson.
- **Constraints:** Assume Xcode 27 beta; keep profiling on Apple silicon; no CUDA; no Mermaid, quizzes, or em dashes.
- **Acceptance checks:** The lesson distinguishes cold preparation from repeated inference, names GPU/ANE evidence, explains the reload failure, and links its human page from the course index.
- **Human lesson:** [02-instruments-from-silicon.html](02-instruments-from-silicon.html)

## Key concepts

- Profile on a real Apple-silicon device. A trace is evidence from the chip.
- Keep Specialization, Load, Setup, and Inference apart. Preparation is not repeated inference.
- GPU and Neural Engine tracks show scheduling. They are not simple good or bad labels.
- Reload and prepare on every tap shows setup in the trace, not slow Metal.

## Takeaways

- Measure one cold launch, one preparation sequence, then several warm inferences.
- Reuse the prepared function before you chase GPU speed.
- A bad trace is a question about which lower layer broke.
