Add OSS CI to cross-compile and run the Cadence Xtensa backend#20208
Add OSS CI to cross-compile and run the Cadence Xtensa backend#20208aliafzal wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20208
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Pending, 1 Unrelated Failure, 2 Unclassified FailuresAs of commit 4916383 with merge base 5526971 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
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. |
This PR needs a
|
1274218 to
8e042d8
Compare
8e042d8 to
30d7f1a
Compare
e8c55b5 to
7ddf69e
Compare
7ddf69e to
80826eb
Compare
80826eb to
99f50c8
Compare
99f50c8 to
8fc2df7
Compare
8fc2df7 to
aec6ba7
Compare
aec6ba7 to
e1f804b
Compare
e1f804b to
7863edc
Compare
The upstream executor_runner cannot cross-compile to Xtensa because gflags pulls
in mkdir(2), absent from Xtensa newlib. Add cadence_executor_runner, a
gflags-free ExecuTorch runner for the Cadence Xtensa cores targeting the
Instruction Set Simulator (xt-run): it uses plain argv parsing like the Arm and
NXP backends, loads a .pte via xt-run semi-hosting, runs the first method with
all-ones inputs, and prints outputs. EXECUTORCH_BUILD_CADENCE_RUNNER builds it,
linking cadence_ops_lib transitively (no --whole-archive, which would double-run
static kernel registration); -lidma is linked only for Vision/Fusion-G3 cores,
whose ops reference iDMA and whose LSPs ship libidma, while HiFi4 does not. Also
register op_quantized_depthwise_conv1d_{ncl,nlc}.cpp in the HiFi4 operators
CMakeLists, which codegen references (omitting the sources broke the
cross-compile link).
Add an xtensa-build job to the Cadence Build & Test workflow
(build-cadence-runner.yml), alongside the existing host cpu-build/cpu-test, to
cross-compile the backend for the Xtensa cores. It is a build stage producing a
runner artifact; the ISS test stage follows separately (cf. cpu-build ->
cpu-test). The Xtensa toolchain and core configs are licensed and fetched at
runtime from an auth-gated object store via a short-lived OIDC credential; the
role, region, and store are supplied through CI variables and are not committed.
setup-xtensa-tools.sh downloads and installs the toolchain/core for a backend,
rewrites the vendor params to local paths, and exports the Xtensa env;
build-cadence-xtensa.sh cross-compiles cadence_executor_runner. The job builds a
[hifi4, vision] matrix and uploads the runner.
fusion_g3 is omitted from the matrix until the upstream fusion_g3 <-> nnlib API
skew is fixed (its runner does not link).
7863edc to
4916383
Compare
Summary
Adds OSS CI to cross-compile and run the Cadence (Xtensa) backend, so backend changes can be validated in CI rather than only through internal flows.
cadence_executor_runner): the upstreamexecutor_runnercan't cross-compile to Xtensa (gflags pulls inmkdir(2), absent from Xtensa newlib). This uses argv-only parsing like the Arm/NXP backends, loads a.pte, and runs the first method on the simulator. Also registers thequantized_depthwise_conv1dops the HiFi4 codegen references but the operators CMake omitted (broke the link).xtensa-buildjob added to the existing Cadence Build & Test workflow (build-cadence-runner.yml), alongside the hostcpu-build/cpu-test. It cross-compiles the runner for thehifi4andvisioncores and uploads it; an ISS test stage follows later (cf.cpu-build->cpu-test). The licensed toolchain/core artifacts are fetched at runtime from an auth-gated store via a short-lived OIDC credential; role/region/store are supplied via CI variables and are not committed.fusion_g3is omitted from the matrix until an upstream operator/nnlib API skew is resolved (its runner does not link yet).Test plan
Validated locally end to end: setup + cross-compile produce an Xtensa ELF runner for
vision; the HiFi4 op sweep passes 15/15 on the simulator and a trivial model returns the expected output.