Skip to content

Update HiFi1 to use nnlib#17676

Open
mcremon-meta wants to merge 1 commit intomainfrom
export-D94179206
Open

Update HiFi1 to use nnlib#17676
mcremon-meta wants to merge 1 commit intomainfrom
export-D94179206

Conversation

@mcremon-meta
Copy link
Contributor

Summary:
As titled. Was falling back on xtensa.
Adds a few fixes to some operators to enable the build for all cases.

Differential Revision: D94179206

Summary:
As titled. Was falling back on xtensa.
Adds a few fixes to some operators to enable the build for all cases.

Differential Revision: D94179206
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 24, 2026

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit 8c489a0 with merge base 7cdd975 (image):

NEW FAILURES - The following jobs have failed:

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 Feb 24, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Feb 24, 2026

@mcremon-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94179206.

@github-actions
Copy link

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.

@mcremon-meta
Copy link
Contributor Author

@dijopaul @cad-audio can you take a look please? :)

#include "xa_nnlib_err_chk.h"

// HiFi1 compatibility: int32_rtor_xtbool2 is not available on HiFi1
#ifndef int32_rtor_xtbool2
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not needed. Can remove this line
xtbool2 con = int32_rtor_xtbool2(0x00000003);
the vaiable not used


// HiFi1 compatibility: AE_MOVAB is not available on HiFi1
#ifndef AE_MOVAB
static inline unsigned char AE_MOVAB(xtbool b) {
Copy link
Contributor

@dijopaul dijopaul Feb 25, 2026

Choose a reason for hiding this comment

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

Can use the below code

#ifndef AE_MOVAB
#ifdef AE_MOVAB1
#define AE_MOVAB AE_MOVAB1
#else
#define AE_MOVAB(x) (x)
#endif
#endif

#ifndef AE_MOVAB2
#define AE_MOVAB2(x) (x)
#endif

@dijopaul
Copy link
Contributor

@dijopaul @cad-audio can you take a look please? :)

The root cause here is that we are using local implementations outside nnlib (which is hifi4 specific). The latest nnlib has all these implementation inside including hifi1 support. So better solution is to upgrade to latest nnlib and avoid these local files. We will make a PR for the same. This may involve some changes in API calls as well due to minor changes in API names.

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. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants