Skip to content

Conversation

Acly
Copy link
Collaborator

@Acly Acly commented Oct 21, 2025

  • Avoid division by zero if one of the spatial dimensions is 1
  • Not unlikely to run into this for vision models that support dynamic resolution input and do some downscale steps
  • CPU, CUDA, OpenCL returned correct results anyway due to clamp, but I think it's still better to not div-by-zero
  • Vulkan didn't clamp, so results were broken. I removed the specialization for align-corners rather than adding more complex pipeline selection and fallback behavior.

* avoid division by zero if one of the spatial dimensions is 1
* cpu, cuda, opencl returned correct result anyway due to clamp
* vulkan didn't clamp for align-corners so results were broken
@github-actions github-actions bot added testing Everything test related Nvidia GPU Issues specific to Nvidia GPUs Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend labels Oct 21, 2025
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

Ack on the CPU change.

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 Nvidia GPU Issues specific to Nvidia GPUs OpenCL Issues specific to the OpenCL backend testing Everything test related Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants