[SYCL] use malloc to support both iGPU and dGPU in same time#18992
Merged
NeoZhangJianyu merged 2 commits intoggml-org:masterfrom Jan 23, 2026
Merged
[SYCL] use malloc to support both iGPU and dGPU in same time#18992NeoZhangJianyu merged 2 commits intoggml-org:masterfrom
NeoZhangJianyu merged 2 commits intoggml-org:masterfrom
Conversation
Closed
NeoZhangJianyu
approved these changes
Jan 23, 2026
ronaldmannak
pushed a commit
to PicoMLX/llama.cpp
that referenced
this pull request
Jan 24, 2026
…g#18992) * use malloc to support both iGPU and dGPU in same time * support windows --------- Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
ronaldmannak
pushed a commit
to PicoMLX/llama.cpp
that referenced
this pull request
Jan 24, 2026
…g#18992) * use malloc to support both iGPU and dGPU in same time * support windows --------- Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
shaofeiqi
pushed a commit
to qualcomm/llama.cpp
that referenced
this pull request
Feb 6, 2026
…g#18992) * use malloc to support both iGPU and dGPU in same time * support windows --------- Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
…g#18992) * use malloc to support both iGPU and dGPU in same time * support windows --------- Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
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.
Fix the issue: #9241.
The host_buffer is used to create the copy of memory on devices.
The original code use the malloc_host() which bind with queue/devices.
When copy the memory from another device which has different context of malloc_host, the memcpy() is forbidden:
SYCL need both queues' context are same when copy memory between devices.
It's same for the memory created by malloc_host().
In the issue case, two dGPU belong to different context, the malloc_host() will be executed on the queue of second GPU.
When set the -ngl 48 (total 49), during load model, the tensor of first GPU will be copied to host_buffer based on queue of second GPU. It will trigger the error of L0.
To support iGPU+dGPU, we can't resolve it by add both GPUs' queue to same context. (iGPU and dGPU are different family and can't belong to same context).
So, we use the malloc() to replace the malloc_host() to support more multiple GPUs cases.
It won't impact the performance.