cortex-m

Quantize and export PyTorch neural networks for Cortex-M targets using CMSIS-NN backends.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/huahai2022/execu-xnnpack --skill cortex-m-huahai2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cortex-m
Source: https://github.com/huahai2022/execu-xnnpack/tree/main/.claude/skills/cortex-m
Command: npx skills add https://github.com/huahai2022/execu-xnnpack --skill cortex-m-huahai2022

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Cortex-M CMSIS-NN backend enables quantization, testing, and exporting models specifically for Cortex-M targets, bridging PyTorch workflows with CMSIS-NN optimizations on resource-constrained devices.

Core Features & Use Cases

  • Architecture-aware backend integration: replaces ATen quantized ops with Cortex-M CMSIS-NN equivalents at the graph level.
  • PT2E quantization pipeline: uses prepare_pt2e and convert_pt2e for deterministic quantization flows.
  • Export and test workflow: includes steps to export the quantized model and run Cortex-M specific tests.

Quick Start

Set up the Cortex-M toolchain, then run the Cortex-M test suite.

Frequently Asked Questions about cortex-m

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I quantize a PyTorch model for Cortex-M CMSIS-NN deployment?

To quantize a PyTorch model for Cortex-M CMSIS-NN deployment, use the PT2E quantization pipeline by running prepare_pt2e and convert_pt2e to achieve deterministic quantization flows.

What is the process for exporting neural networks to Cortex-M edge devices?

Exporting neural networks to Cortex-M edge devices involves replacing ATen quantized ops with CMSIS-NN equivalents at the graph level, applying CortexMPassManager-based rewrites, and exporting to edge runtimes.

Do I need the PT2E quantization pipeline for CMSIS-NN backend development?

Yes, PT2E quantization steps involving prepare_pt2e and convert_pt2e are required to bridge PyTorch workflows with CMSIS-NN optimizations for resource-constrained Cortex-M targets.

Can I test my Cortex-M CMSIS-NN implementations directly within my workflow?

Yes, you can test Cortex-M CMSIS-NN implementations directly by setting up the Cortex-M toolchain and running the included Cortex-M specific test suite.

How does the Cortex-M backend handle ATen quantized operations during optimization?

The Cortex-M backend handles ATen quantized operations by replacing them with architecture-aware Cortex-M CMSIS-NN equivalents directly at the graph level during optimization.

What are the limitations of using CortexMPassManager for edge model rewrites?

CortexMPassManager-based rewrites are specialized for Cortex-M CMSIS-NN targets, meaning optimizations are specifically tailored for resource-constrained edge deployments rather than general-purpose hardware.