Skip to content

metal : add upscale#20284

Merged
ggerganov merged 1 commit into
masterfrom
gg/metal-upscale
Mar 9, 2026
Merged

metal : add upscale#20284
ggerganov merged 1 commit into
masterfrom
gg/metal-upscale

Conversation

@ggerganov

Copy link
Copy Markdown
Member

Add implementation for GGML_OP_UPSCALE used by many vision models. The implementation is not optimized, but will at least avoid unnecessary graph splits.

  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=nearest,transpose=0): OK
  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=nearest,transpose=1): OK
  UPSCALE(type=f32,ne=[2,5,7,11],ne_tgt=[5,7,11,13],mode=nearest): OK
  UPSCALE(type=f32,ne=[5,7,11,13],ne_tgt=[2,5,7,11],mode=nearest): OK
  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=bilinear,transpose=0): OK
  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=bilinear,transpose=1): OK
  UPSCALE(type=f32,ne=[2,5,7,11],ne_tgt=[5,7,11,13],mode=bilinear): OK
  UPSCALE(type=f32,ne=[5,7,11,13],ne_tgt=[2,5,7,11],mode=bilinear): OK
  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=bicubic,transpose=0): OK
  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=bicubic,transpose=1): OK
  UPSCALE(type=f32,ne=[2,5,7,11],ne_tgt=[5,7,11,13],mode=bicubic): OK
  UPSCALE(type=f32,ne=[5,7,11,13],ne_tgt=[2,5,7,11],mode=bicubic): OK
  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=bilinear|antialias,transpose=0): OK
  UPSCALE(type=f32,ne=[512,512,3,2],scale_factor=2,mode=bilinear|antialias,transpose=1): OK
  UPSCALE(type=f32,ne=[2,5,7,11],ne_tgt=[5,7,11,13],mode=bilinear|antialias): OK
  UPSCALE(type=f32,ne=[5,7,11,13],ne_tgt=[2,5,7,11],mode=bilinear|antialias): OK
  UPSCALE(type=f32,ne=[2,5,7,11],ne_tgt=[5,7,11,13],mode=bilinear|align_corners): OK
  UPSCALE(type=f32,ne=[1,4,3,2],ne_tgt=[2,8,3,2],mode=bilinear|align_corners): OK
  UPSCALE(type=f32,ne=[4,1,3,2],ne_tgt=[1,1,3,2],mode=bilinear|align_corners): OK
  UPSCALE(type=f32,ne=[2,5,7,11],ne_tgt=[5,7,11,13],mode=bicubic|align_corners): OK
  UPSCALE(type=f32,ne=[1,4,3,2],ne_tgt=[2,8,3,2],mode=bicubic|align_corners): OK
  UPSCALE(type=f32,ne=[4,1,3,2],ne_tgt=[1,1,3,2],mode=bicubic|align_corners): OK
  22/22 tests passed
  Backend MTL0: OK

@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels Mar 9, 2026
@ggerganov ggerganov merged commit ed0007a into master Mar 9, 2026
60 of 75 checks passed
@ggerganov ggerganov deleted the gg/metal-upscale branch March 9, 2026 14:45
bartowski1182 pushed a commit to bartowski1182/llama.cpp that referenced this pull request Mar 10, 2026
Ethan-a2 pushed a commit to Ethan-a2/llama.cpp that referenced this pull request Mar 20, 2026
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
rsenthilkumar6 pushed a commit to rsenthilkumar6/llama.cpp that referenced this pull request May 1, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
dandm1 pushed a commit to dandm1/llama.cpp that referenced this pull request May 13, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
fewtarius pushed a commit to fewtarius/llama.cpp that referenced this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple Metal https://en.wikipedia.org/wiki/Metal_(API) ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant