sycl: add GGML_SYCL_FATTN_VEC_NTHREADS build option#25205
Open
Titaniumtown wants to merge 1 commit into
Open
Conversation
Default is 128, but for newer hardware such as the intel arc b70, 256 is optimal.
arthw
reviewed
Jul 2, 2026
arthw
left a comment
Contributor
There was a problem hiding this comment.
The idea to set different value for hardware is good.
But the method of hard code is not good.
In base code, there is framework to check the hardware type and set the parameter value in initial stage.
Is it possible to refactor the code by referring them?
code to check the hardware type:
In ggml-sycl.cpp
if (!(ggml_sycl_info().devices[ctx.device].hw_info.arch ==
gpu_arch::intel_gpu_acm_g10 &&
src0->type == GGML_TYPE_Q4_0)) {
use_dequantize_mul_mat_vec =
use_dequantize_mul_mat_vec && !use_mul_mat_vec_q;
}
Check the hardware and set parameter in initial stage:
In ggml-sycl.cpp
info.devices[i].max_wg_per_cu = info.max_work_group_sizes[i] / prop.get_max_compute_units();
info.devices[i].hw_info = get_device_hw_info(&device);
In this case, you could add info.devices[i].xxx = 128 for xe, 256 for xe2.
In the code, call info.devices[i].xxx to get the right value.
Thank you!
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.
Overview
Adds a
GGML_SYCL_FATTN_VEC_NTHREADSoption which sets the VEC_NTHREADS option. This is useful when the hardware supports values different than 128.Additional information
For 1st gen Intel ARC Graphics, 128 is the native option. For 2nd gen Arc Graphics, 256 is what the hardware supports.
Requirements