Repository navigation
Espressif: Add ESP-IDF component template for ExecuTorch - #24292
Draft
JakeStevens wants to merge 2 commits into
Draft
JakeStevens wants to merge 2 commits into
JakeStevens wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24292
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 6 PendingAs of commit f824807 with merge base fcacda3 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
JakeStevens
force-pushed
the
espressif-idf-template
branch
2 times, most recently
from
October 29, 2026 15:41
fc420b3 to
56fda89
Compare
Move the executor runner's ESP PAL to examples/espressif/platform/esp_pal.cpp and point both the executor runner and camera_stream at it, so the Espressif examples have a single strong PAL implementation. Logging now goes through ESP_LOG with an optional ET_ESP_LOG_LEVEL floor, ticks stay on esp_timer, and the PAL allocation fallback uses malloc/free instead of the minimal nullptr behavior.
The skeleton stamped out by the component generator (next commit): - CMakeLists.txt: registry-shaped component with a CONFIG_ET_ENABLE gate (registers empty unless enabled, so vendoring the component does not change a project's firmware) and WHOLE_ARCHIVE kernel registration, with the op profile selected via Kconfig from the generated et_generated.cmake source lists. - et_model.h/.cpp: small C inference API over Program/Method (not extension::Module, whose planned buffers cannot be placed with heap_caps and which hard-references the mmap loader). Arenas and planned buffers are allocated with heap_caps placement options (internal RAM or PSRAM). - esp_pal.cpp: ESP_LOG + esp_timer/cycle-counter platform layer. - mmap_data_loader.cpp: ESP-IDF stub (no mmap; returns NotSupported) so the vendored Module code links; Buffer/File loaders work. - idf_component.yml.in manifest template and component README.
JakeStevens
force-pushed
the
espressif-idf-template
branch
from
October 29, 2026 15:53
56fda89 to
f824807
Compare
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
Add the hand-written template for a generated ExecuTorch ESP-IDF
component.
This contains only the component glue that is copied into generated
output: the component
CMakeLists.txt, manifest template, README,the small C inference API in
et_model.h/et_model.cpp, and theESP-IDF
MmapDataLoaderstub (ESP-IDF has nommap). It deliberatelydoes not carry a PAL copy; the generator in the next PR copies the
shared PAL from #24291.
Splitting the template out keeps the hand-written runtime glue
reviewable separately from the generator and its vendored output.
On its own this PR is inert:
et_generated.cmakeandKconfigareproduced by the generator in the next PR.
Depends on #24291. Draft until that lands, since this branch is
stacked on it.
Test plan
template and built a minimal ESP-IDF consumer that calls
et_model_createforesp32s3andesp32c5with ESP-IDF v6.0.1;both builds complete.
component's
src/platform/esp_pal.cppis byte-identical to theshared PAL from Espressif: Share one ESP-IDF PAL across examples #24291.