Skip to content

Add Xtensa HiFi-optimized TRANSPOSE kernel - #4015

Open
rameshkunasi wants to merge 1 commit into
tensorflow:mainfrom
rameshkunasi:xtensa-transpose
Open

rameshkunasi wants to merge 1 commit into
tensorflow:mainfrom
rameshkunasi:xtensa-transpose

Conversation

@rameshkunasi

Copy link
Copy Markdown
Contributor

Adds an Xtensa NNLib-optimized TRANSPOSE kernel implementation (split out and modernized from #3701):

  • Xtensa optimization (tensorflow/lite/micro/kernels/xtensa/transpose.cc):
    • Optimizes int8 and int16 evaluation on HIFI3, HIFI4, HIFI5, and HIFI_IQ using xa_nn_transpose_8_8 and xa_nn_transpose_16_16 for 1D–5D non-empty tensors, falling back to TransposeEvalReference otherwise.
    • Implements Register_TRANSPOSE_INT8() on Xtensa for int8-only kernel registration.
  • Shared kernel refactoring (transpose.h, transpose_common.cc, transpose.cc):
    • Upgrade tensor index constants to inline constexpr int and guard temp tensor deallocation in ~TransposeContext().
    • Check temp tensor allocations in TransposePrepare and export shared TransposeEvalReference.
  • Unit tests (transpose_test.cc):
    • Add 4D and 5D int8/int16 permutation tests and Register_TRANSPOSE_INT8() coverage.

BUG=n/a

@rameshkunasi
rameshkunasi requested a review from a team as a code owner November 18, 2026 03:19
@rameshkunasi rameshkunasi self-assigned this Nov 18, 2026
@rameshkunasi rameshkunasi added the ci:full Triggers the comprehensive cross-platform test suite. label Nov 18, 2026
@rameshkunasi
rameshkunasi deployed to integration-test November 18, 2026 03:20 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
integration-test — fdfbccb7 Deployed Nov 18, 2026 by rameshkunasi via approval-gate #1404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Triggers the comprehensive cross-platform test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant