Skip to content
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

vulkan: Use push constant offset to handle misaligned descriptors #10987

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

jeffbolznv
Copy link
Collaborator

For #10984.

Compute descriptor misalignment for unary/binary ops, and put the offset in a push descriptor which the shader adds to the index. I did this for all the unary/binary ops except get_rows_quant because those use the quant type for the buffer block and so the indexing wouldn't work.

I don't think test_backend_ops has good coverage for non-zero offsets, so please help suggest and tests I should run. I ran llama-cli on a couple models.

@jeffbolznv jeffbolznv requested a review from 0cc4m December 26, 2024 17:09
@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 Dec 26, 2024
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 to me. I couldn't reproduce the validation issue with the Phi-3 model you mentioned in the issue, but since you and the issue creator confirmed this fixes it, I don't think I need to chase it.

@0cc4m 0cc4m merged commit fdd2188 into ggerganov:master Dec 29, 2024
48 checks passed
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.

2 participants