Skip to content

Arm backend: Add FP16 support to operators pt.2#17088

Merged
martinlsm merged 1 commit into
pytorch:mainfrom
martinlsm:marlin-fp16-support-pt2
Feb 2, 2026
Merged

Arm backend: Add FP16 support to operators pt.2#17088
martinlsm merged 1 commit into
pytorch:mainfrom
martinlsm:marlin-fp16-support-pt2

Conversation

@martinlsm
Copy link
Copy Markdown
Collaborator

@martinlsm martinlsm commented Feb 2, 2026

Add FP16 support for operators:

  • conv2d
  • conv3d
  • cos
  • slice
  • pad

Update op tests to cover the new datatype.

Also correct the test name violations seen in test_conv2d.py.

cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai

Add FP16 support for operators:
 - conv2d
 - conv3d
 - cos
 - slice
 - pad

Update op tests to cover the new datatype.

Also correct the test name violations seen in test_conv2d.py.

Signed-off-by: Martin Lindström <Martin.Lindstroem@arm.com>
Change-Id: Ie02a8d7425443b0abb9561c0fbe73e2f41053adf
Copilot AI review requested due to automatic review settings February 2, 2026 08:14
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Feb 2, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17088

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures, 1 Unrelated Failure

As of commit dc4ae0e with merge base 6364277 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 2, 2026
@martinlsm
Copy link
Copy Markdown
Collaborator Author

@pytorchbot label ciflow/trunk

@martinlsm
Copy link
Copy Markdown
Collaborator Author

@pytorchbot label "partner: arm"

@pytorch-bot pytorch-bot Bot added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label Feb 2, 2026
@martinlsm
Copy link
Copy Markdown
Collaborator Author

@pytorchbot label "release notes: arm"

@pytorch-bot pytorch-bot Bot added the release notes: arm Changes to the ARM backend delegate label Feb 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds FP16 (half-precision floating-point) support to several ARM backend operators, bringing them in line with existing FP32 and BF16 support. The PR also includes test improvements to ensure proper coverage of the new data type.

Changes:

  • Added FP16 as a supported data type for conv2d, conv3d, cos, slice, and pad operators
  • Extended test suites to include FP16 test cases for all affected operators
  • Corrected test function naming inconsistencies in test_conv2d.py (from test_conv2d_* to test_convolution_2d_*)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
backends/arm/operators/op_tosa_conv2d.py Added FP16 to valid input dtypes and updated accumulation logic to use FP32 for FP16 inputs (matching BF16 behavior)
backends/arm/operators/op_slice.py Added FP16 to the list of valid data types
backends/arm/operators/op_cos.py Added FP16 to the list of valid data types
backends/arm/operators/op_constant_pad_nd.py Added FP16 to the list of valid data types
backends/arm/test/ops/test_conv2d.py Added FP16 test data suite, updated test parametrization, and corrected test function names to follow consistent naming convention
backends/arm/test/ops/test_conv3d.py Added FP16 test data suite, updated test parametrization, and refactored to avoid duplicate function calls
backends/arm/test/ops/test_slice.py Added FP16 test data suite and updated test parametrization
backends/arm/test/ops/test_cos.py Added FP16 test data suite and updated test parametrization
backends/arm/test/ops/test_constant_pad_nd.py Added FP16 test data suite and updated test parametrization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@martinlsm martinlsm merged commit 64d7236 into pytorch:main Feb 2, 2026
309 of 317 checks passed
@martinlsm martinlsm deleted the marlin-fp16-support-pt2 branch February 2, 2026 11:41
@zingo
Copy link
Copy Markdown
Collaborator

zingo commented Feb 2, 2026

Arm backend tests fail: test_model_smollm2-135M Is a known fails and unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants