Skip to content

Optimize FP32 MobileNet on Hexagon HVX by dispatching 7x64__hvx_broadcast for f32_gemm/f32_igemm, adding 1x32/8x32__hvx_broadcast IGEMM to f32_gemm_nr2_config, and using 64c__hvx_acc2 for f32_dwconv. - #11717

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_1001390095
Oct 19, 2026

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Optimize FP32 MobileNet on Hexagon HVX by dispatching 7x64__hvx_broadcast for f32_gemm/f32_igemm, adding 1x32/8x32__hvx_broadcast IGEMM to f32_gemm_nr2_config, and using 64c__hvx_acc2 for f32_dwconv.

Benchmark on Qualcomm Snapdragon 8 Elite Gen 5 (Hexagon V81 DSP):

bazel build -c opt --config=hexagon_device_v81 --define=xnn_enable_hvx=true //bench/subgraph:mobilenet
Benchmark Before (us) After (us) Speedup
FP32MobileNetV1 81,547 72,922 1.12x (-10.6%)
FP32MobileNetV2 48,450 43,851 1.10x (-9.5%)
FP32MobileNetV3Large 34,877 32,424 1.08x (-7.0%)
FP32MobileNetV3Small 11,809 10,537 1.12x (-10.8%)

…dcast` for `f32_gemm`/`f32_igemm`, adding `1x32`/`8x32__hvx_broadcast` IGEMM to `f32_gemm_nr2_config`, and using `64c__hvx_acc2` for `f32_dwconv`.

Benchmark on Qualcomm Snapdragon 8 Elite Gen 5 (Hexagon V81 DSP):

```bash
bazel build -c opt --config=hexagon_device_v81 --define=xnn_enable_hvx=true //bench/subgraph:mobilenet
```

| Benchmark | Before (us) | After (us) | Speedup |
| :--- | ---: | ---: | ---: |
| `FP32MobileNetV1` | 81,547 | 72,922 | 1.12x (-10.6%) |
| `FP32MobileNetV2` | 48,450 | 43,851 | 1.10x (-9.5%) |
| `FP32MobileNetV3Large` | 34,877 | 32,424 | 1.08x (-7.0%) |
| `FP32MobileNetV3Small` | 11,809 | 10,537 | 1.12x (-10.8%) |

PiperOrigin-RevId: 1002243336
@copybara-service
copybara-service Bot merged commit 878f1d8 into master Oct 19, 2026
27 checks passed
@copybara-service
copybara-service Bot deleted the test_1001390095 branch October 19, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant