Skip to content

Conversation

@robell
Copy link
Collaborator

@robell robell commented Dec 18, 2025

  • Decompose log1p and mark as supported in TOSA FP profile
  • Add log1p operator tests with data around the epsilon value
  • Add log1p to table-op LUT mapping for quantized path

Change-Id: I34695a95e76e1291f0ccd52df8b7254260e74240

cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai

 * Decompose log1p and mark as supported in TOSA FP profile
 * Add log1p operator tests with data around the epsilon value
 * Add log1p to table-op LUT mapping for quantized path

Change-Id: I34695a95e76e1291f0ccd52df8b7254260e74240
@robell robell requested a review from digantdesai as a code owner December 18, 2025 14:36
Copilot AI review requested due to automatic review settings December 18, 2025 14:36
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 18, 2025

🔗 Helpful Links

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

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

❌ 5 New Failures, 7 Unrelated Failures

As of commit aeaf9d7 with merge base 02682bc (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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

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

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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 Dec 18, 2025
@robell robell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes labels Dec 18, 2025
Copy link
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 support for the log1p operator in the Arm backend by implementing a custom decomposition strategy and marking it as supported in TOSA profiles.

  • Implements a hybrid decomposition using a 6-term Taylor polynomial for small inputs (|x| ≤ 1e-3) and falls back to log(1+x) for larger values
  • Adds log1p to the quantized operator LUT mapping and TOSA FP/BI profile support lists
  • Includes comprehensive test coverage with edge cases around the epsilon threshold

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
backends/arm/test/ops/test_log1p.py New test file with parametrized tests for FP, INT, and VGF pipelines using epsilon-focused test data
backends/arm/quantizer/quantization_annotator.py Adds log1p to the list of table-based quantized operators
backends/arm/operator_support/tosa_profile_supported_op_lists.py Marks log1p as supported in TOSA FP and BI profiles
backends/arm/_passes/insert_table_ops.py Maps log1p EXIR op to torch implementation for LUT generation
backends/arm/_passes/decompose_log1p_pass.py New pass implementing the polynomial/log hybrid decomposition
backends/arm/_passes/arm_pass_manager.py Registers the new decomposition pass in the TOSA pipeline
backends/arm/_passes/init.py Exports the new DecomposeLog1pPass class

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

Signed-off-by: Rob Elliott <robert.elliott@arm.com>
@robell robell merged commit 5282d47 into pytorch:main Dec 19, 2025
280 of 292 checks passed
@zingo
Copy link
Collaborator

zingo commented Dec 19, 2025

@robell this got merged but have fails in Arm tests, are they know fails and unrelated? If so can you please add a note about it so other that checked for errors know, and if not do we need to revert?

EDIT: no problem fails are know, see next comment

@zingo
Copy link
Collaborator

zingo commented Dec 19, 2025

Checked the error it is knows fail and are unrelated to the PR and hopefully fixed now a few merged later then this was merged. #16335
FAILED backends/arm/test/models/test_T5ForConditionalGeneration_arm.py::test_T5ForConditionalGeneration_tosa_FP
FAILED backends/arm/test/models/test_T5ForConditionalGeneration_arm.py::test_T5ForConditionalGeneration_tosa_INT

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: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants