Skip to content

musa: drop mp_21 from the default architectures - #30203

Merged
JohannesGaessler merged 3 commits into
ggml-org:masterfrom
yeahdongcn:musa-drop-mp21
Oct 9, 2026
Merged

JohannesGaessler merged 3 commits into
ggml-org:masterfrom
yeahdongcn:musa-drop-mp21

Conversation

@yeahdongcn

Copy link
Copy Markdown
Collaborator

Overview

Follow-up to #30167. mp_21 caps static shared memory at 28 KB per block, which is the only one below CUDA's 48 KB per-block limit for static shared memory.

So this PR changes the default MUSA_ARCHITECTURES from 21;22;31 to 22;31 and limits the fallback from #30167 to mp_21 on MUSA.

Testing Done

On MTT S5000:

  • test-backend-ops -o MUL_MAT_HADAMARD: 32/32 on master and with this PR.
  • test-backend-ops perf -o MUL_MAT_HADAMARD, m=8192, n=2048, median of 6 interleaved runs: 10680 us/run on master (fallback), 2391 us/run with this PR (FWHT kernel). The 1024 and 4096 cases are unchanged.

Additional information

Requirements

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
@CISC

CISC commented Oct 9, 2026

Copy link
Copy Markdown
Member

Well, if we never build arch 21, how are we supposed to catch the issue in the future?

@JohannesGaessler

Copy link
Copy Markdown
Contributor

In terms of complexity I would say this is worse than master so we should not merge it.

@github-actions github-actions Bot added documentation Improvements or additions to documentation ggml changes relating to the ggml tensor library for machine learning CUDA Related to the CUDA backend labels Oct 9, 2026
@yeahdongcn

Copy link
Copy Markdown
Collaborator Author

In terms of complexity I would say this is worse than master so we should not merge it.

How about I only leave the changes in ggml/src/ggml-cuda/fwht.cu line 215 to 219?

@JohannesGaessler

Copy link
Copy Markdown
Contributor

Well, if we never build arch 21, how are we supposed to catch the issue in the future?

My view is that MUSA support is very low priority and I am open to just removing it entirely. I'm willing to keep it around as long as the maintenance burden is negligible. The purpose of my comment in the previous thread was meant as a hint that this is something that I am weighing against MUSA support.

@JohannesGaessler

Copy link
Copy Markdown
Contributor

How about I only leave the changes in ggml/src/ggml-cuda/fwht.cu line 215 to 219?

The acceptable change to me in terms of reducing maintenance would be to just drop support for any devices with < 48 kB shared memory entirely.

@JohannesGaessler

Copy link
Copy Markdown
Contributor

As of right now I think it is still okay to have to do this once for one kernel. But if this keeps happening I may reconsider.

@yeahdongcn

Copy link
Copy Markdown
Collaborator Author

How about I only leave the changes in ggml/src/ggml-cuda/fwht.cu line 215 to 219?

The acceptable change to me in terms of reducing maintenance would be to just drop support for any devices with < 48 kB shared memory entirely.

Thanks! Please allow me some time to do the updates/tests.

Comment thread ggml/src/ggml-cuda/fwht.cu Resolved
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
@CISC

CISC commented Oct 9, 2026

Copy link
Copy Markdown
Member

Can we also have a warning if you try to build arch 21 so we don't get bugreports?

@yeahdongcn

Copy link
Copy Markdown
Collaborator Author

Can we also have a warning if you try to build arch 21 so we don't get bugreports?

Would a warning message in CMake work for you?

@CISC

CISC commented Oct 9, 2026

Copy link
Copy Markdown
Member

Can we also have a warning if you try to build arch 21 so we don't get bugreports?

Would a warning message in CMake work for you?

Yes.

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
@yeahdongcn

Copy link
Copy Markdown
Collaborator Author

Can we also have a warning if you try to build arch 21 so we don't get bugreports?

Would a warning message in CMake work for you?

Yes.

Done. Please see the latest commit.

@JohannesGaessler
JohannesGaessler merged commit 86a2835 into ggml-org:master Oct 9, 2026
26 of 32 checks passed
ckti pushed a commit to ckti/llama.cpp-consolidated that referenced this pull request Oct 12, 2026
* musa: drop mp_21 from the default architectures

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Address review comments

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Address review comments

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

---------

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
@BrewTestBot BrewTestBot mentioned this pull request Oct 15, 2026
1 task done
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 24, 2026
* musa: drop mp_21 from the default architectures

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Address review comments

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Address review comments

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

---------

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
auRose94 pushed a commit to auRose94/llama.cpp that referenced this pull request Oct 28, 2026
* musa: drop mp_21 from the default architectures

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Address review comments

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Address review comments

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

---------

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CUDA Related to the CUDA backend documentation Improvements or additions to documentation 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