]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
ggml-cpu: remove duplicate conditional check 'iid' (llama/17650)
authorHerman Semenoff <redacted>
Wed, 3 Dec 2025 21:03:19 +0000 (00:03 +0300)
committerGeorgi Gerganov <redacted>
Thu, 11 Dec 2025 13:32:53 +0000 (15:32 +0200)
src/ggml-cpu/ops.cpp

index 608e82af69f497e89eda6a13f6dbcf216ba18eaa..ac16b3681b7e55db41fd61e824218acb3f476f30 100644 (file)
@@ -6383,7 +6383,7 @@ static void ggml_compute_forward_im2col_3d_f16(
                                         const int64_t iih = ioh*s1 + ikh*d1 - p1;
                                         const int64_t iid = iod*s2 + ikd*d2 - p2;
 
-                                        if (iid < 0 || iid >= ID || iih < 0 || iih >= IH || iiw < 0 || iiw >= IW || iid < 0 || iid >= ID) {
+                                        if (iid < 0 || iid >= ID || iih < 0 || iih >= IH || iiw < 0 || iiw >= IW) {
                                             dst_data[iic*KD_KH_KW + ikd * KH_KW + ikh*KW + ikw] = 0;
                                         } else {
                                             const float * const s = (const float *) ((const char *)src_data + iid*nb12 + iih*nb11 + iiw*nb10); // [ID, IH, IW]