You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/arm-mcp-server/3-simd-migration.md
+46-7Lines changed: 46 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ layout: learningpathall
9
9
10
10
{{% notice Note %}} This section uses Visual Studio Code with GitHub Copilot. If you're using a different AI assistant, skip to the next section, where you'll configure the same migration workflow using other agentic systems.{{% /notice %}}
11
11
12
-
When migrating applications from x86 to Arm, you might encounter SIMD (Single Instruction, Multiple Data) code that is written using architecture-specific intrinsics. On x86 platforms, SIMD is commonly implemented with SSE, AVX, or AVX2 intrinsics, while Arm platforms use NEON and SVE intrinsics to provide similar vectorized capabilities. Updating this code manually can be time-consuming and challenging. By combining the Arm MCP Server with a well-defined prompt file, you can create an Arm Cloud Migration Agent in GitHub Copilot that automates much of this work and guides the AI assistant through a structured, architecture-aware migration of your codebase.
12
+
When migrating applications from x86 to Arm, you might encounter SIMD (Single Instruction, Multiple Data) code that is written using architecture-specific intrinsics. On x86 platforms, SIMD is commonly implemented with SSE, AVX, or AVX2 intrinsics, while Arm platforms use NEON and SVE intrinsics to provide similar vectorized capabilities. Updating this code manually can be time-consuming and challenging. By combining the Arm MCP Server with GitHub Copilot, you can create an Arm Cloud Migration Agent that automates much of this work and guides the AI assistant through a structured, architecture-aware migration of your codebase. GitHub Copilot supports two file formats for this: **prompt files** (`.prompt.md`) that reference an already-configured MCP server, and **agent files** (`.agent.md`) that create agents which can be assigned to issues directly in the GitHub interface.
13
13
14
-
This section walks through creating the agent prompt file and using it to migrate a sample x86 application with AVX2 SIMD code to Arm NEON.
14
+
This section walks through both approaches and uses them to migrate a sample x86 application with AVX2 SIMD code to Arm NEON.
15
15
16
16
## Sample x86 code with AVX2 intrinsics
17
17
@@ -175,9 +175,18 @@ int main() {
175
175
}
176
176
```
177
177
178
-
## The Arm migration prompt file
178
+
## Prompt files vs. agent files
179
179
180
-
To automate migration, you can define a prompt file that instructs the AI assistant how to analyze and transform the project using the Arm MCP Server. Prompt files act as executable migration playbooks. They encode best practices, tool usage, and migration strategy, allowing the AI assistant to operate fully autonomously through complex multi-step workflows.
180
+
GitHub Copilot provides two ways to package persistent instructions for the AI assistant:
181
+
182
+
-**Prompt files** (`.prompt.md`) are stored in `.github/prompts/` and reference MCP server tools that you have already configured in your IDE. They are invoked with a slash command such as `/arm-migration`.
183
+
-**Agent files** (`.agent.md`) are stored in `.github/agents/` (or `~/.github/agents/` for global access) and create agents that can be assigned to issues directly in the GitHub interface. They are selected from the agent dropdown in the Copilot Chat window or when assigning an agent to an issue.
184
+
185
+
Both formats encode the same migration logic. Choose whichever fits your workflow.
186
+
187
+
## Option 1: Prompt file
188
+
189
+
A prompt file instructs the AI assistant how to analyze and transform the project using the Arm MCP Server. Prompt files act as executable migration playbooks. They encode best practices, tool usage, and migration strategy, allowing the AI assistant to operate fully autonomously through complex multi-step workflows.
181
190
182
191
Create the following prompt file at `.github/prompts/arm-migration.prompt.md`:
183
192
```markdown
@@ -208,15 +217,45 @@ If you have good versions to update for the Dockerfile, requirements.txt, and ot
208
217
209
218
Provide a summary of the changes you made and how they'll improve the project.
210
219
```
211
-
This prompt file encodes best practices, tool usage, and migration strategy, allowing the AI assistant to operate fully agentically.
220
+
This prompt file requires the Arm MCP Server to be configured in your IDE settings before use.
221
+
222
+
## Option 2: Agent file
223
+
224
+
An agent file creates an agent that can be assigned to issues directly in the GitHub interface. You can download the Arm Cloud Migration Agent file directly:
To make the agent available across all your projects, place it in the global GitHub agents directory:
231
+
232
+
```bash
233
+
mkdir -p ~/.github/agents
234
+
mv arm-migration.agent.md ~/.github/agents/
235
+
```
236
+
237
+
{{% notice Note %}}
238
+
If you prefer to scope the agent to a single repository, place the file in the `.github/agents/` directory at the root of that repository instead:
239
+
```bash
240
+
mkdir -p .github/agents
241
+
mv arm-migration.agent.md .github/agents/
242
+
```
243
+
{{% /notice %}}
212
244
213
245
## Running the migration
214
246
215
-
With the prompt file in place and the Arm MCP Server connected, invoke the migration workflow from your AI assistant:
247
+
With either the prompt file or agent file in place, invoke the migration workflow from GitHub Copilot chat.
248
+
249
+
If you're using the **prompt file**, type:
216
250
217
251
```text
218
252
/arm-migration
219
253
```
254
+
255
+
If you're using the **agent file**, select the `arm-migration-agent` from the agent dropdown in the Copilot Chat window, or assign it to an issue on GitHub.com using the agents panel dropdown.
256
+
257
+

258
+
220
259
The assistant will:
221
260
* Detect x86-specific intrinsics
222
261
* Rewrite SIMD code using NEON
@@ -249,6 +288,6 @@ If compilation or runtime issues occur, feed the errors back to the AI assistant
249
288
250
289
## What you've accomplished and what's next
251
290
252
-
In this section, you've created an Arm Cloud Migration Agent in GitHub Copilot using a prompt file and used it to perform a fully automated migration of x86 AVX2 SIMD code to Arm NEON. You've seen how structured instructions enable the assistant to analyze, transform, and verify architecture-specific code.
291
+
In this section, you've created an Arm Cloud Migration Agent in GitHub Copilot using either a prompt file or an agent file that can be assigned to issues in the GitHub interface, and used it to perform a fully automated migration of x86 AVX2 SIMD code to Arm NEON. You've seen how structured instructions enable the assistant to analyze, transform, and verify architecture-specific code.
253
292
254
293
In the next section, you'll learn how to configure other agentic AI systems with the same migration workflow.
0 commit comments