# Next Steps

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/)
- [Understand profiling with Arm Performix Instruction Mix](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/how-to-1/)
- [Set up and run a GPT-2 baseline](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/how-to-2/)
- [Find GPT-2 hotspots with the Arm Performix Instruction Mix recipe](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/how-to-3/)
- [(Optional) Optimize matmul with vector intrinsics](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/how-to-4/)
- [Compare Neon and SVE with the Arm Performix Instruction Mix recipe](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/how-to-5/)
- [Accelerate execution with KleidiAI](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/how-to-6/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-instruction-mix/_next-steps/)

## Explore related resources
Find more information about the topics in this Learning Path:
- [Arm Performix User Guide](https://developer.arm.com/documentation/110163/latest)
- [Find code hotspots with Arm Performix](https://learn.arm.com/learning-paths/servers-and-cloud-computing/cpu_hotspot_performix/)
- [Generate Arm Performix AI insights in Visual Studio Code with Codex](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/)
- [KleidiAI GitHub Repository](https://gitlab.arm.com/kleidi/kleidiai)
- [GPT-2 Example repository](https://github.com/arm-education/GPT-2-Example)

## Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

### Which Performix recipe should I run first to find the bottleneck?
Start with the Code Hotspots recipe. Set the launch command to the baseline binary and use `-n 150` to bias the profile toward inference time, then review the top functions.

### How do I know that matrix multiplication is the hotspot before I change any code?
The Code Hotspots report ranks functions by sampled time, so `kernels::matmul_ref()` should appear near the top. Use that evidence to decide where to focus subsequent Instruction Mix profiling.

### Where do I add my Neon or SVE intrinsics, and what part of the loop should I change?
Edit `src/kernels/matmul_user.cpp`. Focus on the accumulation loop, `acc += row[j] * x[j];`, and consider lane utilization, loop unrolling, and how you handle the tail.

### What binaries should I expect after building, and where are the reference implementations?
The build produces the scalar baseline `gpt2`, reference variants `gpt2_neon` and `gpt2_sve`, and `gpt2_user` when the user kernel is enabled. The reference kernels are implemented in `matmul_neon.cpp` and `matmul_sve.cpp`.

### How do I verify that my vectorization worked using Performix?
Profile your rebuilt binary with the Instruction Mix recipe and compare the proportion of vector instructions with the baseline. You can also run the reference `gpt2_neon` and `gpt2_sve` and compare instruction mix and the program’s tokens-per-second summary.
