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

sycl: allow ggml-sycl configuration and compilation using Visual Studio project/solution #12625

Merged
merged 10 commits into from
Apr 4, 2025

Conversation

s-Nick
Copy link
Collaborator

@s-Nick s-Nick commented Mar 28, 2025

This PR enable the possibility of compiling and using llama.cpp with ggml-sycl backend as Visual Studio Project/Solution on windows.
The changes don't interfere with anything but the solution generation for ggml-sycl.
The user can decide which compiler wants to use for the rest of llama.cpp, while ggml-sycl will always be compiled using the Intel official compiler.

Tested current and new configurations on Windows 10 and Intel Arc B580

@s-Nick s-Nick requested review from Alcpz and Rbiessy March 28, 2025 10:55
@github-actions github-actions bot added documentation Improvements or additions to documentation ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Mar 28, 2025
Copy link
Collaborator

@Rbiessy Rbiessy left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@qnixsynapse qnixsynapse left a comment

Choose a reason for hiding this comment

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

LGTM

The user can decide which compiler wants to use for the rest of llama.cpp, while ggml-sycl will always be compiled using the Intel official compiler.

This will only work when building ggml and its backend as shared libraries, i.e -DBUILD_SHARED_LIBS=ON.

For building as a single program/static library, -fsycl need to be added to C++ flags and the entire project should be built with the Intel SYCL compiler(icpx/icx).

@s-Nick
Copy link
Collaborator Author

s-Nick commented Mar 31, 2025

Thank you for your feedback @qnixsynapse, I changed the documentation in 85e917d

@s-Nick s-Nick force-pushed the windows_vs_proj branch from 85e917d to ceb389f Compare April 1, 2025 14:06
s-Nick added 3 commits April 1, 2025 15:40
Merged 3rd and 4th point under only one point related to Visual Studio.
Specify better how to build and use Visual Studio solution.
Add note about tested configuration.
Copy link
Collaborator

@NeoZhangJianyu NeoZhangJianyu left a comment

Choose a reason for hiding this comment

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

It's good job!

In the beginning, I don't want to spend more time on building by VS.
So, I choose build directly by cmd line.

I think many windows developers will enjoy this update.

@Alcpz Alcpz removed their request for review April 4, 2025 09:15
@Alcpz
Copy link
Collaborator

Alcpz commented Apr 4, 2025

Removing me from the review as you've already had plenty of feedback. Good Job!

@s-Nick s-Nick force-pushed the windows_vs_proj branch from 5ae31bb to 2ba12ad Compare April 4, 2025 12:41
@s-Nick s-Nick force-pushed the windows_vs_proj branch from 2ba12ad to 9390da9 Compare April 4, 2025 12:47
@s-Nick s-Nick merged commit 94148ba into ggml-org:master Apr 4, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants