Create the FP32 XNNPACK artifact

Run on the development machine:

    

        
        
module-2-cnn-inference-with-quantization/scripts/aot/lower_mobilenetv2_xnnpack.py \
  --spec module-2-cnn-inference-with-quantization/artifacts/mobilenetv2/model_spec.json

    

The script exports MobileNetV2, lowers supported regions to XNNPACK, prints a delegation summary, and writes the FP32 .pte artifact and its size metadata.

You should expect to see output similar to this:

    

        
        
Loading MobileNetV2 weights from module-2-cnn-inference-with-quantization/artifacts/mobilenetv2/mobilenet_v2.pth...
Exporting MobileNetV2...
Lowering with XNNPACK...
Wrote module-2-cnn-inference-with-quantization/artifacts/mobilenetv2/mobilenetv2_xnnpack.pte
PTE size: 13.99 MB
Wrote module-2-cnn-inference-with-quantization/artifacts/mobilenetv2/mobilenetv2_xnnpack.json

Delegation
==========
XNNPACK delegate call sites: 1
Fallback call_function ops:  1
  <built-in function getitem> (1)

    

The generated mobilenetv2_xnnpack.pte is the FP32 ExecuTorch artifact that will run on the Raspberry Pi.

Previous page Complete and continue