# Matched 27-layer ViT profiles

- [Execution timeline](model.html)
- [Exact memory placement](memory.html)
- [Memory screenshot](memory.png)
- [Memory data](memory.json)

Batch 1, 378 x 378 input, 27 transformer layers plus MAP, fused QKV,
FP8 projections/MLP at scale -4, FP16 attention, eight local optimization
steps and B1024 exchange streams. Three resident inference calls pass with
FP32-reference cosine 0.994102280.

The executable is byte-identical to
`artifacts/attention-residual-20260911/full27/model.ipuexe`:
SHA-256 `62fb94a8754c5e03bc1f90696f44c78eb8396f30b55e739df037be504cf74069`.
Thus the memory map also applies to that original execution profile.
The fresh capture has a cropped span of 12,836,412 cycles (8.557608 ms),
six cycles longer than the original 12,836,406-cycle capture.

Both HTML files are standalone. The memory map includes profiling reservations
and all 1,472 tiles. Reused allocations appear below their original occupants;
uncheck “Reused allocations” for a more compact overview of multiple tiles.

This is device execution timing, not the complete host inference loop. The
corresponding unprofiled build measured 8.719821 ms/image with busy polling,
including upload of a prepacked image and embedding download. Profiling and
invocation count differ between these builds (3 profiled calls versus 20
unprofiled calls), so the memory map is specifically for the profiled executable.

## Reproduce

```sh
source .env
RAYON_NUM_THREADS=16 RUST_LOG=info target/release/ipu-trivial-test "$IPU_CONFIG" \
  --sdk "$POPLAR_SDK_ENABLED" \
  --runtime-source artifacts/attention-residual-20260911/source/static_runtime.S \
  --workload siglip-vit-benchmark --vit-layers 27 --vit-batch 1 \
  --fuse-qkv --fp8-scale=-4 --optimization-steps 8 --exchange-stream-words 1024 \
  --reference-run --reference-fp32 --reference-inferences 3 \
  --memory-profile-directory artifacts/blog-profile-20260912/full27/memory \
  --profile-output artifacts/blog-profile-20260912/full27/model.ipuprof \
  --device-lock artifacts/layout-sweep/device.lock \
  --package artifacts/blog-profile-20260912/full27/model.ipuexe
```
