[SYCL] support the missed types in cpy - #26005
Merged
Merged
Conversation
arthw
marked this pull request as draft
July 22, 2026 15:53
arthw
marked this pull request as ready for review
July 28, 2026 13:29
ggerganov
reviewed
Jul 31, 2026
| #include "cpy.hpp" | ||
|
|
||
| #include <float.h> | ||
| #include <atomic> |
Member
There was a problem hiding this comment.
Is this header actually used?
Contributor
There was a problem hiding this comment.
No, they are not used in fact.
Rm them.
Thank you!
huaxel
pushed a commit
to huaxel/CachyLLama
that referenced
this pull request
Aug 2, 2026
* support the missed types in cpy * use correct funct * rm unused code
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 12, 2026
* support the missed types in cpy * use correct funct * rm unused code
mndodd
added a commit
to mndodd/llama.cpp
that referenced
this pull request
Aug 12, 2026
43 upstream commits, 15 of them in our paths. Four conflicts, resolved as follows. The dangerous change in this range did NOT conflict -- see (2). 1. ggml/src/ggml-sycl/element_wise.cpp -- TOOK UPSTREAM VERBATIM. ggml-org#25946 landed upstream as 11b068d. We had been carrying it as a cherry-pick of the then-unmerged PR (ca7c42a) plus two commits of our own stacked on top: 27d821e fastdiv for the strided unary index reconstruction 0595878 fastdiv for the fused-GLU index reconstruction Upstream's landed form contains BOTH optimisations by the same mechanism (init_fastdiv_values host-side + fast_div_modulo in-kernel, on the strided unary path and on all five gated_op_fused_* kernels). All three of ours are therefore superseded and are dropped; the file is now byte-identical to origin/master. Only semantic difference we give up: ours guarded k > u32 with an exact int64 fallback, upstream asserts ggml_nelements(dst) < 2^31 instead -- stricter by 2x, and unreachable for a GLU activation (~8 GB at f32). Our ne>0?ne:1 divisor guard is also dropped; init_fastdiv_values asserts d != 0 and a ggml tensor always has ne[i] >= 1, so it was defensive, not load-bearing. 2. ggml/src/ggml-sycl/fattn.cpp -- PRECEDENCE PRESERVED, both kernels kept. Upstream ggml-org#25025 adds a oneMKL GEMM flash-attention path and gives it BEST_FATTN_KERNEL_MKL = 300 -- the value we already use for BEST_FATTN_KERNEL_MMA. git flagged the enum collision. It did NOT flag the consequential half: upstream places the MKL gate ABOVE our MMA check, and that hunk auto-merged clean. MKL's gate is default-ON (GGML_SYCL_ENABLE_MKL_FA=1) and its envelope -- gqa_ratio >= 2, head_dim % 64 in [64,512], Q->ne[1] >= 32, K->ne[1] >= 1024, no sinks / ALiBi / softcap, with a quantized K/V SKIPPING the F16 stride test -- matches our deploy prefill exactly. Taken verbatim it would have silently replaced the measured MMA kernel with an unmeasured one, staged the whole q8_0 KV cache to F16 first, and (per upstream's own note) broken SYCL graph capture replay. Resolution: MKL renumbered to 400 so both kernels stay reachable, and its gate takes an added !ggml_sycl_fattn_mma_supported(dst) conjunct. MMA wins where MMA is supported; MKL keeps its FULL envelope for everything MMA declines, which is upstream's intent in every case that is not ours. This is a precedence choice, not a revert -- and it is A/B-able without a rebuild: GGML_SYCL_FATTN_MMA=0 -> MMA declines, MKL takes the path GGML_SYCL_ENABLE_MKL_FA=0 -> MKL off entirely Also merged both sides' env-gated instruments, hoisting the kernel selection to a single call: upstream re-derived it three times (watchdog, switch, fingerprint), so an instrument could disagree with what actually ran. All three now read one hoisted `k`. Fixed a latent lie in our own FATTN_DEBUG printer while there -- BEST_FATTN_KERNEL_ONEDNN was printing as "NONE"; ONEDNN and MKL now print. 3. ggml/src/ggml-sycl/cpy.cpp -- kept ours. Upstream's side of the hunk was empty; ggml-org#26005 touched adjacent lines. Our GGML_SYCL_CPY_CENSUS instrument is unchanged. 4. tests/test-backend-ops.cpp -- kept both sides, additive and disjoint (same resolution as the 07-28 sync). Ours = the finding-85 deployed-shape MUL_MAT sweep; upstream's = m==1 either side of MMVF_MAX_BATCH_SIZE. Gates run before this commit: - cmake-option-audit.sh e9fa078 origin/master -> 7/7 watched options unchanged, and --selftest fires (rc=3), so the check is proven able to go red. - post-configure asserts: GGML_SYCL / _F16 / _DNN / _GRAPH all ON. NOT done in this commit, and required before any number from this tree is comparable to a pre-sync one: rebuild + re-baseline. Upstream changed code under every arm; ratios within one arm survive, absolutes do not.
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
The UT will crash after the new cpy UT cases with new types are added.
Additional information
This PR support to the missed data types of the UT cases of CPY OP.
All related cases are passed.
Requirements