Skip to content

[SYCL] Updated SYCL device filtering #8901

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 2 commits into from
Aug 7, 2024

Conversation

OuadiElfarouki
Copy link
Contributor

This is a simple change to the initialization approach of the "filter" value when picking the "preferred platform" in its current form.

Given that there is no direct access to the GGML_SYCL_TARGET at this level, we can use the default_selector_v as an initial hint when the ENV variable is not specified (default_selector_v selects the level-zero by default when using the default intel target, and properly selects CUDA target otherwise given the target triplets we have setup in the Cmake). - One more motivation behind this is that the default selector is added to _devs prior to the filtering step -

This patch makes it thus possible to pick the right platform without necessary specifying the ONEAPI_DEVICE_SELECTOR for non-intel targets, and also keeps the SYCL backend from selecting vendor-heterogeneous platforms in the same setup.

Successfully tested with/without the ENV selector, on multiple platforms and targets.

@github-actions github-actions bot added examples SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Aug 7, 2024
@OuadiElfarouki OuadiElfarouki requested a review from airMeng August 7, 2024 05:40
@OuadiElfarouki OuadiElfarouki merged commit 0478174 into ggml-org:master Aug 7, 2024
53 checks passed
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Aug 7, 2024
* Updated device filter to depend on default_selector (fixes non-intel device issues)
* Small related update to example/sycl Readme
@joeatodd
Copy link
Contributor

Ping @abhilash1910 for info

@abhilash1910
Copy link
Collaborator

Thanks @joeatodd @OuadiElfarouki for adding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants