Skip to content

Adding HiFi5 DSP support in Cadence backend - #21497

Open
dijopaul wants to merge 1 commit into
pytorch:mainfrom
foss-xtensa:main
Open

Adding HiFi5 DSP support in Cadence backend#21497
dijopaul wants to merge 1 commit into
pytorch:mainfrom
foss-xtensa:main

Conversation

@dijopaul

Copy link
Copy Markdown
Contributor

Summary

Add support for HiFi5 DSP build in Cadence backend
Changes are in backend/cadence folder only

Test plan

Verified the build and run locally

Changes are in backend/cadence only
@pytorch-bot

pytorch-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⚠️ 12 Awaiting Approval

As of commit 70c70f2 with merge base b26b9ac (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

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 Jul 30, 2026
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Comment on lines +89 to +91
set(TARGET_DIR hifi)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/third-party/nnlib)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/kernels)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is same for hifi4 and hifi5, can be moved outside

Comment on lines +22 to +44
rm -rf "$HIFI4_DIR_PATH"
mkdir -p "$HIFI4_DIR_PATH"

echo "${green}ExecuTorch: Cloning hifi nnlib"
git clone "https://github.com/foss-xtensa/nnlib-hifi4.git" $HIFI_DIR_PATH
cd $HIFI_DIR_PATH
echo "${green}ExecuTorch: Cloning hifi4 nnlib"
git clone "https://github.com/foss-xtensa/nnlib-hifi4.git" $HIFI4_DIR_PATH
cd $HIFI4_DIR_PATH
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "${red}ExecuTorch: Failed to clone hifi nnlib."
echo "${red}ExecuTorch: Failed to clone hifi4 nnlib."
exit 1
fi

git checkout 64d73d729797388b0e346794d7a2e408374a74de
rm -rf "$HIFI5_DIR_PATH"
mkdir -p "$HIFI5_DIR_PATH"

echo "${green}ExecuTorch: Cloning hifi5 nnlib"
git clone "https://github.com/foss-xtensa/nnlib-hifi5.git" $HIFI5_DIR_PATH
cd $HIFI5_DIR_PATH
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "${red}ExecuTorch: Failed to clone hifi5 nnlib."
exit 1
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to rewrite as a loop instead of duplication.

targets= (hifi4 hifi5)

for target in ${targets[@]};
do
...
done

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.

2 participants