Skip to content

NXP backend: shortening test names POC - #25002

Merged
novak-vaclav merged 1 commit into
pytorch:mainfrom
nxp-upstream:feature/EIEX-1153-shorten-test-archive-file-names
Dec 3, 2026
Merged

novak-vaclav merged 1 commit into
pytorch:mainfrom
nxp-upstream:feature/EIEX-1153-shorten-test-archive-file-names

Conversation

@novak-vaclav

@novak-vaclav novak-vaclav commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Motivation

This commit adds a proof-of-concept mechanism that shortens the names of the per-test output directories in the NXP backend test suite. By default, Windows limits a file path to 260 characters. Until now, each output directory was named after the full sanitized PyTest node ID, which includes the class name and parametrization ID. As a result, the paths of the output directories and debug archives often went over this limit.

Gathering test information

The code no longer derives the test identity by sanitizing the raw PyTest node ID with a regex. It now builds it from the PyTest request object, using request.node.name.

Naming scheme

Each test's output directory, and the .zip archive created from it in debug mode, is named <test_name>_<hash>. Here <hash> is the first 8 hex characters of the SHA-256 hash of the PyTest node id.

Files inside the directory no longer repeat the test name. They have fixed names such as model_delegated.pte, model_non_delegated.pte, model_non_quantized.pte, model_cortex_m_delegated.pte and model_partitioned.json. This also shortens the paths.

Linking shortened names back to tests

This works on two levels:

  • Global mapping (always): each test adds a <dir_name>: <full test ID> entry to test_name_mapping.yaml in the root of the outputs directory.
  • Per-test summary (debug mode only): when the log level is DEBUG, summary.yaml inside the test directory records the full test identity.

cc @robert-kalmar @JakeStevens @digantdesai @rascani @roman-janik-nxp

@novak-vaclav novak-vaclav added the module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ label Nov 12, 2026
@novak-vaclav novak-vaclav added the release notes: nxp Changes to the NXP Neutron backend delegate label Nov 12, 2026
Copilot AI balanced review requested due to automatic review settings November 12, 2026 22:03
@pytorch-bot

pytorch-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit c8727b2 with merge base efd7f9b (image):

NEW FAILURES - The following jobs have failed:

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 Nov 12, 2026

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 has insufficient remaining quota. Try requesting a review at a lower effort level.

@novak-vaclav novak-vaclav self-assigned this Nov 12, 2026
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-1153-shorten-test-archive-file-names branch from 517c414 to abfcf00 Compare November 16, 2026 10:33
Copilot AI balanced review requested due to automatic review settings November 16, 2026 10:33

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 has insufficient remaining quota. Try requesting a review at a lower effort level.

@novak-vaclav novak-vaclav changed the title feat: shortening test names POC NXP backend: shortening test names POC Nov 16, 2026
@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Internal tests are passing: https://bamboo3.sw.nxp.com/browse/MLTECE-EXGHSPEC86-4

Comment thread backends/nxp/tests/nsys_testing.py Resolved
Comment thread backends/nxp/tests/nsys_testing.py Resolved
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-1153-shorten-test-archive-file-names branch from abfcf00 to 6963af5 Compare November 25, 2026 14:02
Copilot AI balanced review requested due to automatic review settings November 25, 2026 14:02

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 has insufficient remaining quota. Try requesting a review at a lower effort level.

@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-1153-shorten-test-archive-file-names branch from 6963af5 to 359c887 Compare November 25, 2026 14:03
@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Fixed issues found by @robert-kalmar and rebased onto main.

@robert-kalmar

Copy link
Copy Markdown
Collaborator

LGTM. Two small things:

  • filelock is used in nsys_testing.py but not declared in requirements-dev.txt — please add it.
  • inspector_check doesn't need the request fixture at all; it only needs the test dir path, so I'd revert it closer to the original inspector_check(test_name: str) shape — e.g. inspector_check(get_test_dir(request)) — instead of passing request in and calling get_test_dir internally.

Generated by WChat AI Agent

@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-1153-shorten-test-archive-file-names branch from 359c887 to c938232 Compare November 27, 2026 13:41
Copilot AI balanced review requested due to automatic review settings November 27, 2026 13:41

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 has insufficient remaining quota. Try requesting a review at a lower effort level.

@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Fixed issues found by @robert-kalmar.
Also changed the human readable part of the archive names to be the name of the test file instead of the name of the test itself and unset the width limit of lines in yaml summaries to enable more efficient lookup in them.

@robert-kalmar

Copy link
Copy Markdown
Collaborator

Fixed issues found by @robert-kalmar. Also changed the human readable part of the archive names to be the name of the test file instead of the name of the test itself and unset the width limit of lines in yaml summaries to enable more efficient lookup in them.

Not yet : filelock is used in nsys_testing.py but not declared in requirements-dev.txt — please add it.

Comment thread backends/nxp/tests/nsys_testing.py Resolved
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-1153-shorten-test-archive-file-names branch from c938232 to 423d03a Compare December 1, 2026 09:33
Copilot AI balanced review requested due to automatic review settings December 1, 2026 09:33

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 has insufficient remaining quota. Try requesting a review at a lower effort level.

@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-1153-shorten-test-archive-file-names branch from 423d03a to 4402fbe Compare December 1, 2026 09:47
@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Fixed issues found by @robert-kalmar and @MartinPavella and rebased onto current main.
Sorry for that missing not-added change in requirements-dev 😄

@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.

Looks great!

@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-1153-shorten-test-archive-file-names branch from 4402fbe to c8727b2 Compare December 3, 2026 10:05
Copilot AI balanced review requested due to automatic review settings December 3, 2026 10:05

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 has insufficient remaining quota. Try requesting a review at a lower effort level.

@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Thank you for reviews. Rebased onto main so OSS tests run again, then I will merge.

@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Internal tests are passsing. The OSS CI failures do not seem to be related to this PR.
Merging.

@novak-vaclav
novak-vaclav merged commit 1ed2990 into pytorch:main Dec 3, 2026
213 of 219 checks passed
@novak-vaclav
novak-vaclav deleted the feature/EIEX-1153-shorten-test-archive-file-names branch December 3, 2026 13:31
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