Skip to content

Add PPC64LE backend#1193

Draft
hanno-becker wants to merge 6 commits intomainfrom
ppc64le_backend
Draft

Add PPC64LE backend#1193
hanno-becker wants to merge 6 commits intomainfrom
ppc64le_backend

Conversation

@hanno-becker
Copy link
Copy Markdown
Contributor

@hanno-becker hanno-becker commented Sep 20, 2025

This PR is a continuation of #1184, taking care of integration and testing.

  • (Required) @mkannwischer or @hanno-becker review assembly and confirm validity of arithmetic bounds assumed by the frontend.
    • Issue: InvNTT needs to move Montgomery scaling to the front to avoid overflow. @dannytsen
  • (Optional) Generate twiddles using autogen as done for the other backends
  • (Required) Understand exact architecture requirement: Is the code supported on Power8 or not?
  • (Required) Rebase atop Add backend unit tests #1187 so we get further confidence in correctness through random tests

@hanno-becker hanno-becker force-pushed the ppc64le_backend branch 3 times, most recently from 259a5a3 to 346cc92 Compare September 20, 2025 19:22
@hanno-becker hanno-becker marked this pull request as ready for review September 20, 2025 19:25
@hanno-becker hanno-becker requested a review from a team as a code owner September 20, 2025 19:25
@hanno-becker hanno-becker force-pushed the ppc64le_backend branch 2 times, most recently from 4005fdf to fbdf60e Compare September 23, 2025 14:09
@dannytsen
Copy link
Copy Markdown

@hanno-becker Will take a look.

@hanno-becker hanno-becker added ppc64le enhancement New feature or request labels Oct 10, 2025
dannytsen and others added 6 commits October 18, 2025 19:39
The supported native functions include:
1. MLK_USE_NATIVE_NTT (ntt_ppc.S)
2. MLK_USE_NATIVE_INTT (intt_ppc.S)
3. MLK_USE_NATIVE_POLY_REDUCE (reduce.S)
4. MLK_USE_NATIVE_POLY_TOMONT (poly_tomont.S)

And other interface functions and headers.

Signed-off-by: Danny Tsen <dtsen@us.ibm.com>
This commit prepares scripts/autogen and scripts/cfify for
the work-in-progress addition of riscv64 and ppc64le backends.
Specifically, simpasm needs to be invoked with the right cross
compiler for those architectures, and scripts/cfify needs to accept
riscv64 and ppc64le architecture parameters.

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
mkannwischer added a commit that referenced this pull request Dec 18, 2025
Courtesy of Basil Hess/IBM, we know have a self-hosted POWER10 runner.
This commit adds functional tests to CI.
I had attempted to add it to the existign "kat_tests", but the sanitizer tests
don't work properly on that platform.
Note that opt tests are already enabled so that
#1193 can simply be
rebased on top of this.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
mkannwischer added a commit that referenced this pull request Dec 18, 2025
Courtesy of Basil Hess/IBM, we know have a self-hosted POWER10 runner.
This commit adds functional tests to CI.
I had attempted to add it to the existign "kat_tests", but the sanitizer tests
don't work properly on that platform.
Note that opt tests are already enabled so that
#1193 can simply be
rebased on top of this.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
mkannwischer added a commit that referenced this pull request Dec 18, 2025
Courtesy of Basil Hess/IBM, we know have a self-hosted POWER10 runner.
This commit adds functional tests to CI.
I had attempted to add it to the existign "kat_tests", but the sanitizer tests
don't work properly on that platform.
Note that opt tests are already enabled so that
#1193 can simply be
rebased on top of this.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
hanno-becker pushed a commit that referenced this pull request Dec 18, 2025
Courtesy of Basil Hess/IBM, we know have a self-hosted POWER10 runner.
This commit adds functional tests to CI.
I had attempted to add it to the existign "kat_tests", but the sanitizer tests
don't work properly on that platform.
Note that opt tests are already enabled so that
#1193 can simply be
rebased on top of this.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
hanno-becker pushed a commit that referenced this pull request Dec 18, 2025
Courtesy of Basil Hess/IBM, we know have a self-hosted POWER10 runner.
This commit adds functional tests to CI.
I had attempted to add it to the existign "kat_tests", but the sanitizer tests
don't work properly on that platform.
Note that opt tests are already enabled so that
#1193 can simply be
rebased on top of this.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
@mkannwischer
Copy link
Copy Markdown
Contributor

Marking this as draft - @bhess, please feel free to continue here or start your own branch. Please mark it as ready for review when you need some feedback.

@mkannwischer mkannwischer marked this pull request as draft April 2, 2026 09:57
@dannytsen
Copy link
Copy Markdown

@mkannwischer I don't have write access to this branch, ppc64le_backend so I can't commit my patch. Or do you prefer I create another PR? Thanks.

@dannytsen
Copy link
Copy Markdown

@mkannwischer OK. I just created a new PR against this branch, #1647 . Please review the code. @bhess Please also review the code. Thanks.

@dannytsen
Copy link
Copy Markdown

@mkannwischer OK. I just created a new PR against this branch, #1647 . Please review the code. @bhess Please also review the code. Thanks.

@mkannwischer OK. I just created a new PR against this branch, #1647 . Please review the code. @bhess Please also review the code. Thanks.

@mkannwischer @bhess I'm sorry. I may have created a PR from a wrong branch of my repo. I have to close it and re-do.

@dannytsen
Copy link
Copy Markdown

@mkannwischer @bhess I have re-created a new PR against the main branch which is much cleaner, #1648. Please review.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants