Skip to content

ggml: Conditionally enable power11 backend based on compiler support - #24687

Merged
taronaeo merged 2 commits into
ggml-org:masterfrom
shalinib-ibm:patch-1
Jun 17, 2026
Merged

taronaeo merged 2 commits into
ggml-org:masterfrom
shalinib-ibm:patch-1

Conversation

@shalinib-ibm

Copy link
Copy Markdown
Contributor

Guard POWER11 backend creation behind a compiler flag check for -mcpu=power11. This avoids build failures on current GCC/Clang toolchains while preserving forward compatibility once POWER11 support becomes available.

Overview

Additional information

Requirements

Guard POWER11 backend creation behind a compiler flag check for -mcpu=power11. This avoids build failures on current GCC/Clang toolchains while preserving forward compatibility once POWER11 support becomes available.
@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Jun 16, 2026
@shalinib-ibm

Copy link
Copy Markdown
Contributor Author

@taronaeo @ggerganov Can you please help review this PR.
This change is required to build project ollama which integrates llama.cpp as a submodule. Currently, when building ollama, the build system incorrectly attempts to use -mcpu=power11, which causes a compiler error on many toolchains (e.g., error: unrecognized argument in option ‘-mcpu=power11’).

@taronaeo

Copy link
Copy Markdown
Member

Nice! This is going to be quite a problem for awhile; we had the same problem when IBM z17 launched 😆

Let me look at this again once I am back.

@taronaeo taronaeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this change looks good for cross-building. I was taking a look at native POWER builds too and notice that -mcpu=power11 is missing from ggml/src/ggml-cpu/CMakeLists.txt.

I'm not too familiar with the differences between POWER10 and POWER11's milli/microcode, but this means that POWER11's intrinsic is locked at POWER10 at the moment, right?

Would you like to address it in this PR too, or is that not needed?

@shalinib-ibm

Copy link
Copy Markdown
Contributor Author

Hi @taronaeo Thank you pointing it out . From a core architecture perspective, there is no difference from P10 to P11 . Since MMA optimisations would remain the same for P10 and P11, we have used -mcpu=power10 for P11 as well.

@taronaeo taronaeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Triggered CI.

ggml-cpu: Use -mcpu=power10 for P10 and P11
@shalinib-ibm
shalinib-ibm requested a review from ggerganov as a code owner June 17, 2026 06:45
@taronaeo

Copy link
Copy Markdown
Member

@ggml-org/maintainers Another approval please.

@taronaeo

Copy link
Copy Markdown
Member

CI failures unrelated to PR. Merging.

@taronaeo
taronaeo merged commit 2e88c49 into ggml-org:master Jun 17, 2026
25 of 27 checks passed
@shalinib-ibm

Copy link
Copy Markdown
Contributor Author

Thank you so much @taronaeo @max-krasnyansky for the review and merge process.

adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
…ort (ggml-org#24687)

* ggml: Conditionally enable power11 backend based on compiler support

Guard POWER11 backend creation behind a compiler flag check for -mcpu=power11. This avoids build failures on current GCC/Clang toolchains while preserving forward compatibility once POWER11 support becomes available.

* Update CMakeLists.txt

ggml-cpu: Use -mcpu=power10 for P10 and P11
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
…ort (ggml-org#24687)

* ggml: Conditionally enable power11 backend based on compiler support

Guard POWER11 backend creation behind a compiler flag check for -mcpu=power11. This avoids build failures on current GCC/Clang toolchains while preserving forward compatibility once POWER11 support becomes available.

* Update CMakeLists.txt

ggml-cpu: Use -mcpu=power10 for P10 and P11
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
…ort (ggml-org#24687)

* ggml: Conditionally enable power11 backend based on compiler support

Guard POWER11 backend creation behind a compiler flag check for -mcpu=power11. This avoids build failures on current GCC/Clang toolchains while preserving forward compatibility once POWER11 support becomes available.

* Update CMakeLists.txt

ggml-cpu: Use -mcpu=power10 for P10 and P11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants