Repository navigation
NXP backend: Save the partitioned graph when intermediates_dir is set - #25761
Draft
Conversation
When `intermediates_dir` is set, the `NeutronPartitioner` now saves the tagged program as JSON for the Model Explorer GUI. A missing `model_explorer` installation is reported as a warning and the export continues, because the dump is only a debugging aid. The partitioner API does not expose the name of the partitioned method, so the dumps of a multi-method program are kept apart by the number of the `partition()` call: neutron_partitioned.json, neutron_partitioned_1.json, ... See EIEX-1255. Compile specs are now read by key through the new module-level `get_compile_spec_value()` helper in nxp_backend.py, replacing the index-based access in the partitioner and the long key comparison chain in `NeutronBackend.preprocess`. The helper maps the encoded "None" to `None`, so `intermediates_dir` is no longer compared against a string literal. The test helper in tests/nsys_testing.py no longer patches `NeutronPartitioner.partition` to produce the dump, because it already passes `intermediates_dir`.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25761
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 885f303 with merge base ddb19ca ( 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. |
robert-kalmar
requested review from
MartinPavella,
irtrukhina,
jirioc and
novak-vaclav
November 26, 2026 14:19
Collaborator
Author
|
Might conflicts with #25002 , once merge will rebase and mark the PR as |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
intermediates_diris set, theNeutronPartitionernow saves the tagged program as JSON for the Model Explorer GUI. A missingmodel_explorerinstallation is reported as a warning and the export continues, because the dump is only a debugging aid.The partitioner API does not expose the name of the partitioned method, so the dumps of a multi-method program are kept apart by the number of the
partition()call: neutron_partitioned.json,neutron_partitioned_1.json, ... See EIEX-1255.
Compile specs are now read by key through the new module-level
get_compile_spec_value()helper in nxp_backend.py, replacing the index-based access in the partitioner and the long key comparison chain inNeutronBackend.preprocess. The helper maps the encoded "None" toNone, sointermediates_diris no longer compared against a string literal.The test helper in tests/nsys_testing.py no longer patches
NeutronPartitioner.partitionto produce the dump, because it already passesintermediates_dir.Test plan
Already covered by existing unittest
cc @JakeStevens @digantdesai @rascani