8000 graph : fix geglu by ggerganov · Pull Request #14077 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

graph : fix geglu #14077

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 1 commit into from
Jun 9, 2025
Merged

graph : fix geglu #14077

merged 1 commit into from
Jun 9, 2025

Conversation

ggerganov
Copy link
Member

cont #14074

Comment on lines +666 to +668
// TODO: these conts should not be needed
ggml_tensor * x0 = ggml_cont(ctx0, ggml_view_2d(ctx0, cur, split_point, cur->ne[1], cur->nb[1], 0));
ggml_tensor * x1 = ggml_cont(ctx0, ggml_view_2d(ctx0, cur, split_point, cur->ne[1], cur->nb[1], split_point * ggml_element_size(cur)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we move this operation earlier and have it for both SWIGLU/GEGLU to keep things DRY?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, though either way is OK. If we repeat more than 2 times, then we can DRY it.

I would first look into removing the conts btw.

Copy link
Collaborator
@CISC CISC Jun 9, 2025

Choose a reason for hiding this comment

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

This seems safe to me (removing ggml_cont), at least it works fine here, what would be the scenario when it's not?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is correct, I just think the conts should not be necessary and introduce overhead.

@ggerganov ggerganov merged commit 201b31d into master Jun 9, 2025
54 checks passed
@ggerganov ggerganov deleted the gg/fix-geglu branch June 9, 2025 14:17
635A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0