Skip to content

NXP backend: Extended support of HardTanh with new Neutron C flow#20177

Open
StrycekSimon wants to merge 3 commits into
pytorch:mainfrom
nxp-upstream:feature/nxg10272/EIEX-866-add-hard_tanh-support-using-new-neutron-flow
Open

NXP backend: Extended support of HardTanh with new Neutron C flow#20177
StrycekSimon wants to merge 3 commits into
pytorch:mainfrom
nxp-upstream:feature/nxg10272/EIEX-866-add-hard_tanh-support-using-new-neutron-flow

Conversation

@StrycekSimon

@StrycekSimon StrycekSimon commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adjusted Clamp-related implementation for reuse in HardTanh as both operators share the same logic.
  • Add new Neutron C flow support for HardTanh operator.

Test plan

Covered by newly added tests.

cc @robert-kalmar @JakeStevens @digantdesai @rascani

@pytorch-bot

pytorch-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 4 New Failures, 2 Unrelated Failures

As of commit aceb746 with merge base 55c54c7 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs 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 Jun 10, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 10, 2026

Copy link
Copy Markdown

CLA Not Signed

@MartinPavella MartinPavella force-pushed the feature/nxg10272/EIEX-866-add-hard_tanh-support-using-new-neutron-flow branch from f862141 to 081d423 Compare June 16, 2026 07:39
@MartinPavella MartinPavella self-assigned this Jun 16, 2026
@MartinPavella MartinPavella added module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate labels Jun 16, 2026
@MartinPavella MartinPavella marked this pull request as ready for review June 16, 2026 07:40
@MartinPavella

Copy link
Copy Markdown
Collaborator

@novak-vaclav please feel free to have a look.

Comment thread backends/nxp/tests/ir/converter/node_converter/test_hardtanh_converter.py Outdated
Comment thread backends/nxp/tests/ir/converter/node_converter/test_clamp_converter.py Outdated
Copilot AI review requested due to automatic review settings June 17, 2026 14:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

"Relu": (0.0, float("inf")),
}

class HardTanhConverter(ClampConverter):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice, elegant solution! Love it.

@roman-janik-nxp roman-janik-nxp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please rebase, resolve conflicts and fix license year.

Comment thread backends/nxp/backend/ir/converter/quantization_utils.py Outdated
@MartinPavella MartinPavella force-pushed the feature/nxg10272/EIEX-866-add-hard_tanh-support-using-new-neutron-flow branch from 4c38bf3 to bfadd84 Compare June 19, 2026 06:21
Copilot AI review requested due to automatic review settings June 19, 2026 06:34
@MartinPavella MartinPavella force-pushed the feature/nxg10272/EIEX-866-add-hard_tanh-support-using-new-neutron-flow branch from bfadd84 to aceb746 Compare June 19, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants