Adding HiFi5 DSP support in Cadence backend - #21497
Conversation
Changes are in backend/cadence only
🔗 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.
|
|
This PR needs a
|
| set(TARGET_DIR hifi) | ||
| add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/third-party/nnlib) | ||
| add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/kernels) |
There was a problem hiding this comment.
This code is same for hifi4 and hifi5, can be moved outside
| 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 |
There was a problem hiding this comment.
Suggest to rewrite as a loop instead of duplication.
targets= (hifi4 hifi5)
for target in ${targets[@]};
do
...
done
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