Repository navigation
Add E9945 support and harden ENN integration (#24165) - #24165
alirezamonfared wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24165
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: ✅ No FailuresAs of commit d117543 with merge base 79feb10 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@alirezamonfared has exported this pull request. If you are a Meta employee, you can view the originating Diff in D124906831. |
This PR needs a
|
f61c5a6 to
33a9aef
Compare
Summary: Pull Request resolved: pytorch#24165 ## Summary This change improves the Samsung ENN backend integration by: - adding E9945 to `SamsungChipset` and testing compile-spec serialization for every supported chipset; - adding host-side AOT and Android runtime build targets, including static backend registration; - importing `CompileSpec` from the lightweight schema module; - hardening `EnnExecutor` teardown after partial or failed initialization; - fixing portable `size_t` formatting and Android variadic logging. `EnnExecutor` now avoids model and buffer cleanup before successful initialization or model creation, releases buffers only when an allocation exists, and still closes a valid model when no buffers were allocated. Android logging copies the `va_list` and uses `__android_log_vprint` before writing separately to stderr. Existing E9955 and E9965 behavior is unchanged. The backend continues to load ENN dynamically from the device and does not bundle vendor binaries. This is backend infrastructure and contains no application, model, asset, device-eligibility, or rollout policy. ## Authorship Authored with Codex. Test Plan: ## Test plan - Unit tests passed for compile-spec serialization of E9945, E9955, and E9965, including case-insensitive E9945 lookup (2 tests). - Built the Samsung host-side AOT and Android ENN runtime/static-registration targets. - On E9945 hardware, loaded an ExecuTorch program with one ENN delegate and observed successful model open, commit, and execution. - Verified output matched the reference within the expected tolerance and placement logs confirmed NPU participation. - With the ENN runtime library unavailable, verified the backend returned a clean initialization error and the process remained alive. - Lint and format checks passed. Reviewed By: sivapatibandla Differential Revision: D124906831 Pulled By: alirezamonfared Signed-off-by: Ali Monfared <2058201+alirezamonfared@users.noreply.github.com>
Summary: ## Summary This change improves the Samsung ENN backend integration by: - adding E9945 to `SamsungChipset` and testing compile-spec serialization for every supported chipset; - adding host-side AOT and Android runtime build targets, including static backend registration; - importing `CompileSpec` from the lightweight schema module; - hardening `EnnExecutor` teardown after partial or failed initialization; - fixing portable `size_t` formatting and Android variadic logging. `EnnExecutor` now avoids model and buffer cleanup before successful initialization or model creation, releases buffers only when an allocation exists, and still closes a valid model when no buffers were allocated. Android logging copies the `va_list` and uses `__android_log_vprint` before writing separately to stderr. Existing E9955 and E9965 behavior is unchanged. The backend continues to load ENN dynamically from the device and does not bundle vendor binaries. This is backend infrastructure and contains no application, model, asset, device-eligibility, or rollout policy. ## Authorship Authored with Codex. Test Plan: ## Test plan - Unit tests passed for compile-spec serialization of E9945, E9955, and E9965, including case-insensitive E9945 lookup (2 tests). - Built the Samsung host-side AOT and Android ENN runtime/static-registration targets. - On E9945 hardware, loaded an ExecuTorch program with one ENN delegate and observed successful model open, commit, and execution. - Verified output matched the reference within the expected tolerance and placement logs confirmed NPU participation. - With the ENN runtime library unavailable, verified the backend returned a clean initialization error and the process remained alive. - Lint and format checks passed. Reviewed By: sivapatibandla Differential Revision: D124906831 Pulled By: alirezamonfared Signed-off-by: Ali Monfared <2058201+alirezamonfared@users.noreply.github.com>
33a9aef to
5a4972e
Compare
Summary: ## Summary This change improves the Samsung ENN backend integration by: - adding E9945 to `SamsungChipset` and testing compile-spec serialization for every supported chipset; - adding host-side AOT and Android runtime build targets, including static backend registration; - importing `CompileSpec` from the lightweight schema module; - hardening `EnnExecutor` teardown after partial or failed initialization; - fixing portable `size_t` formatting and Android variadic logging. `EnnExecutor` now avoids model and buffer cleanup before successful initialization or model creation, releases buffers only when an allocation exists, and still closes a valid model when no buffers were allocated. Android logging copies the `va_list` and uses `__android_log_vprint` before writing separately to stderr. Existing E9955 and E9965 behavior is unchanged. The backend continues to load ENN dynamically from the device and does not bundle vendor binaries. This is backend infrastructure and contains no application, model, asset, device-eligibility, or rollout policy. ## Authorship Authored with Codex. Test Plan: ## Test plan - Unit tests passed for compile-spec serialization of E9945, E9955, and E9965, including case-insensitive E9945 lookup (2 tests). - Built the Samsung host-side AOT and Android ENN runtime/static-registration targets. - On E9945 hardware, loaded an ExecuTorch program with one ENN delegate and observed successful model open, commit, and execution. - Verified output matched the reference within the expected tolerance and placement logs confirmed NPU participation. - With the ENN runtime library unavailable, verified the backend returned a clean initialization error and the process remained alive. - Lint and format checks passed. Reviewed By: sivapatibandla Differential Revision: D124906831 Pulled By: alirezamonfared
5a4972e to
76160fa
Compare
Summary: ## Summary This change improves the Samsung ENN backend integration by: - adding E9945 to `SamsungChipset` and testing compile-spec serialization for every supported chipset; - adding host-side AOT and Android runtime build targets, including static backend registration; - importing `CompileSpec` from the lightweight schema module; - hardening `EnnExecutor` teardown after partial or failed initialization; - fixing portable `size_t` formatting and Android variadic logging. `EnnExecutor` now avoids model and buffer cleanup before successful initialization or model creation, releases buffers only when an allocation exists, and still closes a valid model when no buffers were allocated. Android logging copies the `va_list` and uses `__android_log_vprint` before writing separately to stderr. Existing E9955 and E9965 behavior is unchanged. The backend continues to load ENN dynamically from the device and does not bundle vendor binaries. This is backend infrastructure and contains no application, model, asset, device-eligibility, or rollout policy. ## Authorship Authored with Codex. Test Plan: ## Test plan - Unit tests passed for compile-spec serialization of E9945, E9955, and E9965, including case-insensitive E9945 lookup (2 tests). - Built the Samsung host-side AOT and Android ENN runtime/static-registration targets. - On E9945 hardware, loaded an ExecuTorch program with one ENN delegate and observed successful model open, commit, and execution. - Verified output matched the reference within the expected tolerance and placement logs confirmed NPU participation. - With the ENN runtime library unavailable, verified the backend returned a clean initialization error and the process remained alive. - Lint and format checks passed. Reviewed By: sivapatibandla Differential Revision: D124906831 Pulled By: alirezamonfared
76160fa to
d117543
Compare
Summary:
Summary
This change improves the Samsung ENN backend integration by:
SamsungChipsetand testing compile-spec serialization for every supported chipset;CompileSpecfrom the lightweight schema module;EnnExecutorteardown after partial or failed initialization;size_tformatting and Android variadic logging.EnnExecutornow avoids model and buffer cleanup before successful initialization or model creation, releases buffers only when an allocation exists, and still closes a valid model when no buffers were allocated. Android logging copies theva_listand uses__android_log_vprintbefore writing separately to stderr.Existing E9955 and E9965 behavior is unchanged. The backend continues to load ENN dynamically from the device and does not bundle vendor binaries. This is backend infrastructure and contains no application, model, asset, device-eligibility, or rollout policy.
Authorship
Authored with Codex.
Test Plan:
Test plan
Reviewed By: sivapatibandla
Differential Revision: D124906831
Pulled By: alirezamonfared