Skip to content

[Espressif] Run host tests in parallel - #26101

Draft
rascani wants to merge 1 commit into
pytorch:mainfrom
rascani:esp32-host-tests-xdist
Draft

rascani wants to merge 1 commit into
pytorch:mainfrom
rascani:esp32-host-tests-xdist

Conversation

@rascani

@rascani rascani commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Espressif host-tests job runs the Python suite serially, followed by the host delegate checks on plain and sanitized builds. The suite is pure host work with no shared writable state, so run all three pytest invocations with pytest-xdist, capped to the container CPU quota with the existing pytest-parallelism helper and one torch thread per worker, following the emulator tests in test_espressif.sh. --durations=10 only reports the slowest tests for future profiling. The CMake builds are unchanged.

Authored with AI assistance using Muse Code powered by muse-latest.

Test plan

Local verification: bash -n and shellcheck pass on .ci/scripts/test_espressif_host.sh. The test set was audited before parallelizing it: all file writes go through per-test tmp_path (including the host-runner binaries, whose outputs land in the test's temp dir, and the xts3 parser fixture, which compiles into a worker-specific temp dir), module-scoped fixtures are deep-copied before use or worker-local, the disable_grad fixtures restore per test, randomness is explicitly seeded, and there is no hypothesis, env mutation, chdir, or module-level mutable state.

Measured on this pull request (Test ESP32 Emulators run 47443230350, all jobs passing, versus run 47228895698): the main suite went from 1,236 passed, 82 skipped in 861 seconds to 1,259 passed, 82 skipped in 135 seconds, running on eight workers (PYTEST_XDIST_AUTO_NUM_WORKERS=8); each host delegate phase went from 82 passed in about 172 seconds to 82 passed in 43 and 39 seconds; and the host-tests job fell from 25m39s to 9m10s, with no failures.

The host test job runs the Espressif Python suite serially, followed by the host delegate checks on two builds. The suite is pure host work with no shared writable state, so run all three pytest invocations with pytest-xdist, capped to the container CPU quota with the existing pytest-parallelism helper and one torch thread per worker, following the emulator tests in test_espressif.sh.

Authored with AI assistance using Muse Code powered by muse-latest.
@pytorch-bot

pytorch-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 8 Pending

As of commit 3f88a1a with merge base f2d27e5 (image):
💚 Looks good so far! There are no failures yet. 💚

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 4, 2026

This branch has not been deployed

No deployments
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant