Skip to content

vulkan: implement more backpropagation operators #11914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 25, 2025

Conversation

remyoudompheng
Copy link
Contributor

@remyoudompheng remyoudompheng commented Feb 16, 2025

This PR is a follow-up to #11769
It implements the following ops for Vulkan:

  • GGML_OP_ROPE_BACK
  • GGML_OP_RMS_NORM_BACK
  • GGML_OP_SILU_BACK
  • GGML_OP_SOFTMAX_BACK

Shaders are mostly copy-pasted from CUDA kernels with inspiration from existing Vulkan shaders for wg sizes.
ROPE_BACK is implemented using the existing RoPE shader (but with negative angle).

@github-actions github-actions bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Feb 16, 2025
@jeffbolznv
Copy link
Collaborator

The backend tests all pass for me (RTX 4070). I reviewed the code, though I didn't review the shader calculations in great detail.

@remyoudompheng
Copy link
Contributor Author

Rebased to solve conflicts with #11769

Copy link
Collaborator

@0cc4m 0cc4m left a comment

Choose a reason for hiding this comment

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

Looks good, thank you.

@0cc4m 0cc4m merged commit 61d4f39 into ggml-org:master Feb 25, 2025
46 checks passed
orca-zhang pushed a commit to orca-zhang/llama.cpp that referenced this pull request Feb 26, 2025
* vulkan: implement GGML_OP_ROPE_BACK

* vulkan: implement GGML_OP_RMS_NORM_BACK

* vulkan: implement GGML_OP_SILU_BACK

* vulkan: implement GGML_OP_SOFTMAX_BACK
mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
* vulkan: implement GGML_OP_ROPE_BACK

* vulkan: implement GGML_OP_RMS_NORM_BACK

* vulkan: implement GGML_OP_SILU_BACK

* vulkan: implement GGML_OP_SOFTMAX_BACK
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Mar 19, 2025
* vulkan: implement GGML_OP_ROPE_BACK

* vulkan: implement GGML_OP_RMS_NORM_BACK

* vulkan: implement GGML_OP_SILU_BACK

* vulkan: implement GGML_OP_SOFTMAX_BACK
mostlyuseful pushed a commit to mostlyuseful/llama.cpp that referenced this pull request May 12, 2025
* vulkan: implement GGML_OP_ROPE_BACK

* vulkan: implement GGML_OP_RMS_NORM_BACK

* vulkan: implement GGML_OP_SILU_BACK

* vulkan: implement GGML_OP_SOFTMAX_BACK
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 Vulkan Issues specific to the Vulkan backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants