[GH-ISSUE #15487] 0.20.5: Metal shader compilation fails on M5 Max (MTLGPUFamilyMetal4) — MPPTensorOpsMatMul2d type mismatch #35661

Open
opened 2026-04-22 20:20:00 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @dextersecret on GitHub (Apr 10, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15487

the GPU family: MTLGPUFamilyApple10 (1010) block, the MPPTensorOpsMatMul2dImpl.h:3266:5: error: static_assert failed block, and the Ollama version.
NOTE: it works on 0.18.3 on the same hardware

Originally created by @dextersecret on GitHub (Apr 10, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15487 the GPU family: MTLGPUFamilyApple10 (1010) block, the MPPTensorOpsMatMul2dImpl.h:3266:5: error: static_assert failed block, and the Ollama version. NOTE: it works on 0.18.3 on the same hardware
Author
Owner

@thejohnnybot commented on GitHub (Apr 11, 2026):

same

<!-- gh-comment-id:4227932915 --> @thejohnnybot commented on GitHub (Apr 11, 2026): same
Author
Owner

@edmava8 commented on GitHub (Apr 11, 2026):

Same

<!-- gh-comment-id:4228063273 --> @edmava8 commented on GitHub (Apr 11, 2026): Same
Author
Owner

@Winddfall commented on GitHub (Apr 12, 2026):

same

<!-- gh-comment-id:4230897724 --> @Winddfall commented on GitHub (Apr 12, 2026): same
Author
Owner

@illimit3 commented on GitHub (Apr 12, 2026):

same

<!-- gh-comment-id:4231239879 --> @illimit3 commented on GitHub (Apr 12, 2026): same
Author
Owner

@alanhere commented on GitHub (Apr 13, 2026):

Confirming same issue on M5 MacBook Air
I can reproduce this on a standard M5 MacBook Air (24 GB unified memory) running Ollama 0.20.6 attempting to load gemma4:e4b.

Environment:
Hardware: Apple MacBook Air, M5, 24 GB
GPU family: MTLGPUFamilyApple10 / MTLGPUFamilyMetal4
macOS: Tahoe 26.3.1
Ollama: 0.20.6
Model: gemma4:e4b

Report
The device reports MTLGPUFamilyMetal4 (5002) and the crash report — Metal shader compilation fails with:
static_assert failed due to requirement '__is_same_v<bfloat, half>'
"Input types must match cooperative tensor types"
followed by:
ggml_metal_init: error: failed to initialize the Metal library
ggml_backend_metal_device_init: error: failed to allocate context
GGML_ASSERT(backend) failed
SIGABRT: abort

<!-- gh-comment-id:4237738385 --> @alanhere commented on GitHub (Apr 13, 2026): **Confirming same issue on M5 MacBook Air** I can reproduce this on a standard M5 MacBook Air (24 GB unified memory) running Ollama 0.20.6 attempting to load gemma4:e4b. **Environment:** Hardware: Apple MacBook Air, M5, 24 GB GPU family: MTLGPUFamilyApple10 / MTLGPUFamilyMetal4 macOS: Tahoe 26.3.1 Ollama: 0.20.6 Model: gemma4:e4b **Report** The device reports MTLGPUFamilyMetal4 (5002) and the crash report — Metal shader compilation fails with: static_assert failed due to requirement '__is_same_v<bfloat, half>' "Input types must match cooperative tensor types" followed by: ggml_metal_init: error: failed to initialize the Metal library ggml_backend_metal_device_init: error: failed to allocate context GGML_ASSERT(backend) failed SIGABRT: abort
Author
Owner

@marcolussetti commented on GitHub (Apr 14, 2026):

Same behavior reported by @alanhere on Ollama 0.20.7 as well.

Environment:
Hardware: Apple MacBook Pro, M5 Pro, 64 GB
GPU family: MTLGPUFamilyApple10 / MTLGPUFamilyMetal4
macOS: Tahoe 26.3.2
Ollama: 0.20.7
Model: gemma4:31b

<!-- gh-comment-id:4245675455 --> @marcolussetti commented on GitHub (Apr 14, 2026): Same behavior reported by @alanhere on Ollama 0.20.7 as well. Environment: Hardware: Apple MacBook Pro, M5 Pro, 64 GB GPU family: MTLGPUFamilyApple10 / MTLGPUFamilyMetal4 macOS: Tahoe 26.3.2 Ollama: 0.20.7 Model: gemma4:31b
Author
Owner

@PureBlissAK commented on GitHub (Apr 18, 2026):

🤖 Automated Triage & Analysis Report

Issue: #15487
Analyzed: 2026-04-18T18:21:09.079399

Analysis

  • Type: unknown
  • Severity: medium
  • Components: unknown

Implementation Plan

  • Effort: medium
  • Steps:

This issue has been triaged and marked for implementation.

<!-- gh-comment-id:4274307802 --> @PureBlissAK commented on GitHub (Apr 18, 2026): <!-- ollama-issue-orchestrator:v1 issue:15487 --> ## 🤖 Automated Triage & Analysis Report **Issue**: #15487 **Analyzed**: 2026-04-18T18:21:09.079399 ### Analysis - **Type**: unknown - **Severity**: medium - **Components**: unknown ### Implementation Plan - **Effort**: medium - **Steps**: *This issue has been triaged and marked for implementation.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35661