Skip to content

Alignment assertions in xa_nn_avgpool_16 fail when used with TFLM #16

Description

@narrietal

In the xa_nn_avgpool_16 function, the following pointer alignment checks are currently used:

/* Pointer alignment checks */
XA_NNLIB_ARG_CHK_ALIGN(p_out, ALIGNMENT, -1);
XA_NNLIB_ARG_CHK_ALIGN(p_inp, ALIGNMENT, -1);

When integrating this function with TensorFlow Lite Micro (TFLM), these assertions can fail due to stricter alignment requirements imposed by the ALIGNMENT macro.

However, in the similar function xa_nn_maxpool_16, the alignment checks are implemented as:

/* Pointer alignment checks */
XA_NNLIB_ARG_CHK_ALIGN(p_out, sizeof(WORD16), -1);
XA_NNLIB_ARG_CHK_ALIGN(p_inp, sizeof(WORD16), -1);

This approach appears to be more appropriate for 16-bit data and should not trigger alignment issues in the same context.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions