Skip to content

Commit f02301c

Browse files
adding summary and faqs
1 parent 8ba0fd6 commit f02301c

1 file changed

Lines changed: 47 additions & 1 deletion

File tree

  • content/learning-paths/servers-and-cloud-computing/performix-instruction-mix

content/learning-paths/servers-and-cloud-computing/performix-instruction-mix/_index.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,57 @@ prerequisites:
1919
- Basic understanding of matrix multiplication
2020
- Basic understanding of writing SIMD code with Neon or SVE
2121

22+
# START generated_summary_faq
23+
generated_summary_faq:
24+
template_version: summary-faq-v3
25+
generated_at: '2026-07-15T19:50:40Z'
26+
generator: ai
27+
ai_assisted: true
28+
ai_review_required: true
29+
model: gpt-5
30+
prompt_template: summary-faq-v3
31+
source_hash: 22b8b268d361bfa326a92845a7a0878e26719ef182c3e907fd6da5dcd5503388
32+
summary_generated_at: '2026-07-15T19:50:40Z'
33+
summary_source_hash: 22b8b268d361bfa326a92845a7a0878e26719ef182c3e907fd6da5dcd5503388
34+
faq_generated_at: '2026-07-15T19:50:40Z'
35+
faq_source_hash: 22b8b268d361bfa326a92845a7a0878e26719ef182c3e907fd6da5dcd5503388
36+
summary: >-
37+
You'll build a GPT-2 inference example on an Arm Linux target and use Arm Performix to analyze
38+
execution behavior. After running the Code Hotspots recipe to locate the dominant `matmul`
39+
kernel, you'll use the Instruction Mix recipe to compare scalar and vector execution patterns
40+
on Arm Neoverse. You'll then compare the scalar `gpt2` baseline with `gpt2_neon`, `gpt2_sve`,
41+
optional `gpt2_user`, and the KleidiAI-backed `gpt2_kai_sve` path, validating vectorization
42+
and throughput changes with Performix data and tokens-per-second results.
43+
faqs:
44+
- question: Which Performix recipe should I run first to find the bottleneck?
45+
answer: >-
46+
Start with the Code Hotspots recipe. Set the launch command to the baseline binary and use
47+
`-n 150` to bias the profile toward inference time, then review the top functions.
48+
- question: How do I know that matrix multiplication is the hotspot before I change any code?
49+
answer: >-
50+
The Code Hotspots report ranks functions by sampled time, so `kernels::matmul_ref()` should appear
51+
near the top. Use that evidence to decide where to focus subsequent Instruction Mix profiling.
52+
- question: Where do I add my Neon or SVE intrinsics, and what part of the loop should I change?
53+
answer: >-
54+
Edit `src/kernels/matmul_user.cpp`. Focus on the accumulation loop, `acc += row[j] * x[j];`,
55+
and consider lane utilization, loop unrolling, and how you handle the tail.
56+
- question: What binaries should I expect after building, and where are the reference implementations?
57+
answer: >-
58+
The build produces the scalar baseline `gpt2`, reference variants `gpt2_neon` and `gpt2_sve`,
59+
and `gpt2_user` when the user kernel is enabled. The reference kernels are implemented in
60+
`matmul_neon.cpp` and `matmul_sve.cpp`.
61+
- question: How do I verify that my vectorization worked using Performix?
62+
answer: >-
63+
Profile your rebuilt binary with the Instruction Mix recipe and compare the proportion of
64+
vector instructions with the baseline. You can also run the reference `gpt2_neon` and `gpt2_sve`
65+
and compare instruction mix and the program's tokens-per-second summary.
66+
# END generated_summary_faq
67+
2268
author:
2369
- Kieran Hejmadi
2470
- Oliver Grainge
2571

26-
generate_summary_faq: true
72+
generate_summary_faq: false
2773
rerun_summary: false
2874
rerun_faqs: false
2975

0 commit comments

Comments
 (0)