Repository navigation
moss-image : view qkv slices instead of slice+reshape - #2232
Conversation
The qkv projections were split with ggml_ext_slice followed by ggml_reshape_4d, which materialised a copy of each slice. A ggml_view_4d over the fused qkv tensor reads the same elements in place. Together with the ggml submodule bump this takes 50-step 1024x1024 sampling from 379.49 s to 356.12 s (-6.16%) with byte-identical output.
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
leejet
left a comment
There was a problem hiding this comment.
Please remove the ggml submodule update from this PR and submit the ggml changes separately, either:
- To upstream ggml-org/ggml. Once merged, I can sync them into leejet/ggml’s sd.cpp branch.
- Directly to the sd.cpp branch of leejet/ggml.
Please keep this PR focused on the MOSS-Image QKV view optimization and validate it against the existing ggml revision.
|
Thank you for your contribution. |
The qkv projections were split with ggml_ext_slice followed by ggml_reshape_4d, which materialised a copy of each slice. A ggml_view_4d over the fused qkv tensor reads the same elements in place.
Together with the ggml submodule bump (rope changes,
cpychanges) this takes 50-step 1024x1024 sampling from 379.49 s to 356.12 s (-6.16%) with byte-identical output.Checklist
Summary by CodeRabbit