sycl: Add option to set the SYCL architecture for all targets#10266
Merged
Alcpz merged 3 commits intoggml-org:masterfrom Nov 19, 2024
Merged
sycl: Add option to set the SYCL architecture for all targets#10266Alcpz merged 3 commits intoggml-org:masterfrom
Alcpz merged 3 commits intoggml-org:masterfrom
Conversation
Contributor
Rbiessy
commented
Nov 12, 2024
- Convert GGML_SYCL_HIP_TARGET to the more generic GGML_SYCL_ARCH option
- Document that setting GGML_SYCL_ARCH can improve the performance
- I have read the contributing guidelines
- Self-reported review complexity:
- Low
- Medium
- High
* Convert GGML_SYCL_HIP_TARGET to the more generic GGML_SYCL_ARCH option * Document that setting GGML_SYCL_ARCH can improve the performance
Contributor
Author
|
Hello @airMeng @NeoZhangJianyu I am working with @Alcpz on the SYCL backend. Would you be able to review this change along with the related PR #10267? |
Alcpz
approved these changes
Nov 12, 2024
airMeng
suggested changes
Nov 13, 2024
Collaborator
NeoZhangJianyu
left a comment
There was a problem hiding this comment.
A common comment is change the name from GGML_SYCL_ARCH to GGML_SYCL_DEVICE_ARCH.
GGML_SYCL_ARCH is too simple to understand it.
docs/backend/SYCL.md
Outdated
| |--------------------|---------------------------------------|---------------------------------------------| | ||
| | GGML_SYCL | ON (mandatory) | Enable build with SYCL code path.<br>FP32 path - recommended for better perforemance than FP16 on quantized model| | ||
| | GGML_SYCL_TARGET | INTEL *(default)* \| NVIDIA \| AMD | Set the SYCL target device type. | | ||
| | GGML_SYCL_ARCH | "" | Set the SYCL target architecture, optional except for AMD. Setting the architecture can improve the performance. See the table [here](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/OffloadDesign.md#--offload-arch) for a list of valid architectures. | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | GGML_SYCL_ARCH | "" | Set the SYCL target architecture, optional except for AMD. Setting the architecture can improve the performance. See the table [here](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/OffloadDesign.md#--offload-arch) for a list of valid architectures. | | |
| | GGML_SYCL_DEVICE_ARCH | Optional (except for AMD) | Set the SYCL device architecture, optional except for AMD. Setting the device architecture can improve the performance. See the table [--offload-arch](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/OffloadDesign.md#--offload-arch) for a list of valid architectures. | |
ggml/CMakeLists.txt
Outdated
| option(GGML_SYCL_F16 "ggml: use 16 bit floats for sycl calculations" OFF) | ||
| set (GGML_SYCL_TARGET "INTEL" CACHE STRING | ||
| "ggml: sycl target device") | ||
| set (GGML_SYCL_ARCH "" CACHE STRING "ggml: sycl architecture") |
Collaborator
There was a problem hiding this comment.
Suggested change
| set (GGML_SYCL_ARCH "" CACHE STRING "ggml: sycl architecture") | |
| set (GGML_SYCL_DEVICE_ARCH "" CACHE STRING "ggml: sycl device architecture") |
NeoZhangJianyu
approved these changes
Nov 15, 2024
Collaborator
NeoZhangJianyu
left a comment
There was a problem hiding this comment.
It's good to create this new compiler parameter.
It could be used for AOT building to speed up startup in the future.
Thank you!
Contributor
Author
|
Hello @airMeng can you confirm you are fine with merging this PR? Your review is blocking the PR at the moment, thanks. |
airMeng
approved these changes
Nov 18, 2024
arthw
pushed a commit
to arthw/llama.cpp
that referenced
this pull request
Dec 20, 2024
…org#10266) * Add option to set the SYCL architecture for all targets * Convert GGML_SYCL_HIP_TARGET to the more generic GGML_SYCL_ARCH option * Document that setting GGML_SYCL_ARCH can improve the performance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.