Skip to content

Feature/nxa15600/eiex 1037 improve mapping algorithm - #22614

Open
irtrukhina wants to merge 3 commits into
pytorch:mainfrom
nxp-upstream:feature/nxa15600/EIEX-1037_improve_mapping_algorithm
Open

Feature/nxa15600/eiex 1037 improve mapping algorithm#22614
irtrukhina wants to merge 3 commits into
pytorch:mainfrom
nxp-upstream:feature/nxa15600/EIEX-1037_improve_mapping_algorithm

Conversation

@irtrukhina

@irtrukhina irtrukhina commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Improve NXP Neutron operator-to-Edge profiling map

  1. Improve TFLite-to-Neutron mapping algorithm

    • Filter tensor I/O to dynamic (Variable) tensors only, excluding constants
    • Group Neutron subgraphs into linearly-connected execution chains based on matching dynamic I/O tensor names
    • Match each Neutron chain to a corresponding TFLite operator chain by comparing boundary inputs and outputs
  2. Fix mapping for batch > 1

    • Enable dumpMicrocode in the converter log to include the Microinstructions section
    • Remap NeutronOperator locations and kernel counts using the actual CALLARGS sequence from the microcode, which accounts for batch repetitions and converter-injected helper kernels (e.g. MemCpy)
  3. Fix profiling time scaling

    • Neutron profiling timestamps are measured in clock cycles; divide by the Neutron NPU frequency to convert to seconds

Test plan

Tests included

cc @robert-kalmar @JakeStevens @digantdesai @rascani

@irtrukhina irtrukhina added the module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ label Sep 8, 2026
@pytorch-bot

pytorch-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 36a70f6 with merge base 7dc8641 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@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 Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

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/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant