Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport xtensa_codegen to main (v2) #7432

Open
wants to merge 614 commits into
base: main
Choose a base branch
from
Open

Conversation

steven-johnson
Copy link
Contributor

@steven-johnson steven-johnson commented Mar 17, 2023

This backports the branch for Xtensa codegen into main. Note that it deliberately ignores changes to apps/ (which had grown stale); those changes may or may not be backported at a later date.

Aside from simd_op_check_xtensa, there are few tests for the new codegen paths; the next step to remedy that will be updating the buildbots to add code coverage for the existing test suite to the extent that is possible via AOT only (since the Xtensa codegen does not support JIT).

Aelphy and others added 30 commits December 1, 2022 17:03
* Improved gather_load with IVP_GATHER

* Improved gather_load specialization
…es with 0_off_3 functions. (#7184)

* Added missing types to CodeGen_Xtensa.cpp and fixed the issues with 0_off_3 functions

* improved is_extract_0_of_3 variable naming
…he common Xtensa code there. (#7186)

* Added add_platform_headers hook in CodeGen_C and relocated the common Xtensa code there.

* Fixed spelling mistake in the comment and improved the function naming to add_platform_prologue
It's functionally identical to posix_allocator.cpp and the WEAK issue should be resolved by now.
* [xtensa] Also special-case WEAK_INLINE for xtensa

* Update runtime_internal.h

* Also use the version of `halide_malloc_alignment()` from runtime_internal.h instead of an extern decl, so we can inline it
* [xtensa] Added initial support for float16_t

* Added SELECT support for float16_t

* [xtensa] added conversions between float16_t and int32_t
* Commented failing tests out

* [xtensa] fixed most of failing tests

* [xtensa] added sanitized op name check to simd_op_check_xtensa

* [xtensa] Made `serialize` to be a pure function, fixed IVP_MULN_2X32 test
* [xtensa] Add xtensa_io.cpp

This is a better option than posix_io.cpp on Xtensa

* Update xtensa_io.cpp
* [xtensa] DMA support improvements.

This includes multiple related changes:
* all transactions are 2D.
* Each buffer will use a separate DMA channel.
* For the case when destination is an output buffer, we can delay the wait for completion until the beginning of it's producer.

* Fix review comments

* Handle an error in halide_init_dma

* Address review comments
Fix was made in Codegen_C.cpp a while back; the cache must be clear and end-of-func to avoid trying to share assignments between do-par-for lambdas.
Passing __user_context doesn't always get the constness right; _ucon does and is terser
Aelphy and others added 30 commits February 6, 2024 11:22
* [xtensa] Renamed SEL instructions to semantically correct

* [xtensa] updated the types definitions in halide_xtensa_div32

* [xtensa] added int32 by int16 vector division

* [xtensa] replaced convert int16->int32_x2->int16 to two interleavs for better efficiency
* Fix simd_op_check_xtensa

* Update simd_op_check_xtensa.cpp
…8108)

[xtensa] added vector extracts for floats + moved float16_t and int48_t to prologue
* [Xtensa codegen] Specializations for load/store and fma support

* format
…8215)

Fixed index conversion for gather_load with undefined ramp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants