Skip to content

Commit 8dfac46

Browse files
committed
SYCL: Use GGML_UNUSED for unused variables
1 parent 39b4c47 commit 8dfac46

File tree

11 files changed

+151
-151
lines changed

11 files changed

+151
-151
lines changed

ggml/src/ggml-sycl/common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ struct bin_bcast_sycl {
626626
});
627627
}
628628
}
629-
(void) ctx;
629+
GGML_UNUSED(ctx);
630630
}
631631
};
632632

ggml/src/ggml-sycl/dmmv.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,9 @@ void ggml_sycl_op_dequantize_mul_mat_vec(
10151015
break;
10161016
}
10171017

1018-
(void) src1;
1019-
(void) dst;
1020-
(void) src1_ddq_i;
1021-
(void) src1_ncols;
1022-
(void) src1_padded_row_size;
1018+
GGML_UNUSED(src1);
1019+
GGML_UNUSED(dst);
1020+
GGML_UNUSED(src1_ddq_i);
1021+
GGML_UNUSED(src1_ncols);
1022+
GGML_UNUSED(src1_padded_row_size);
10231023
}

ggml/src/ggml-sycl/element_wise.cpp

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,10 @@ inline void ggml_sycl_op_silu(ggml_backend_sycl_context & ctx, const ggml_tensor
519519

520520
silu_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
521521

522-
(void) src1;
523-
(void) dst;
524-
(void) src1_dd;
525-
(void) ctx;
522+
GGML_UNUSED(src1);
523+
GGML_UNUSED(dst);
524+
GGML_UNUSED(src1_dd);
525+
GGML_UNUSED(ctx);
526526
}
527527

528528
inline void ggml_sycl_op_gelu(ggml_backend_sycl_context & ctx, const ggml_tensor *src0, const ggml_tensor *src1,
@@ -535,10 +535,10 @@ inline void ggml_sycl_op_gelu(ggml_backend_sycl_context & ctx, const ggml_tensor
535535

536536
gelu_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
537537

538-
(void) src1;
539-
(void) dst;
540-
(void) src1_dd;
541-
(void) ctx;
538+
GGML_UNUSED(src1);
539+
GGML_UNUSED(dst);
540+
GGML_UNUSED(src1_dd);
541+
GGML_UNUSED(ctx);
542542
}
543543
inline void ggml_sycl_op_gelu_quick(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
544544
const ggml_tensor *src1, ggml_tensor *dst,
@@ -551,10 +551,10 @@ inline void ggml_sycl_op_gelu_quick(ggml_backend_sycl_context & ctx, const ggml_
551551

552552
gelu_quick_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
553553

554-
(void) src1;
555-
(void) dst;
556-
(void) src1_dd;
557-
(void) ctx;
554+
GGML_UNUSED(src1);
555+
GGML_UNUSED(dst);
556+
GGML_UNUSED(src1_dd);
557+
GGML_UNUSED(ctx);
558558
}
559559

560560
inline void ggml_sycl_op_tanh(ggml_backend_sycl_context & ctx, const ggml_tensor *src0, const ggml_tensor *src1,
@@ -566,10 +566,10 @@ inline void ggml_sycl_op_tanh(ggml_backend_sycl_context & ctx, const ggml_tensor
566566
GGML_ASSERT( dst->type == GGML_TYPE_F32);
567567
tanh_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
568568

569-
(void) src1;
570-
(void) dst;
571-
(void) src1_dd;
572-
(void) ctx;
569+
GGML_UNUSED(src1);
570+
GGML_UNUSED(dst);
571+
GGML_UNUSED(src1_dd);
572+
GGML_UNUSED(ctx);
573573
}
574574

575575
inline void ggml_sycl_op_relu(ggml_backend_sycl_context & ctx, const ggml_tensor *src0, const ggml_tensor *src1,
@@ -582,10 +582,10 @@ inline void ggml_sycl_op_relu(ggml_backend_sycl_context & ctx, const ggml_tensor
582582

583583
relu_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
584584

585-
(void) src1;
586-
(void) dst;
587-
(void) src1_dd;
588-
(void) ctx;
585+
GGML_UNUSED(src1);
586+
GGML_UNUSED(dst);
587+
GGML_UNUSED(src1_dd);
588+
GGML_UNUSED(ctx);
589589
}
590590

591591
inline void ggml_sycl_op_hardsigmoid(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -599,10 +599,10 @@ inline void ggml_sycl_op_hardsigmoid(ggml_backend_sycl_context & ctx, const ggml
599599

600600
hardsigmoid_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
601601

602-
(void) src1;
603-
(void) dst;
604-
(void) src1_dd;
605-
(void) ctx;
602+
GGML_UNUSED(src1);
603+
GGML_UNUSED(dst);
604+
GGML_UNUSED(src1_dd);
605+
GGML_UNUSED(ctx);
606606
}
607607

608608
inline void ggml_sycl_op_hardswish(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -615,10 +615,10 @@ inline void ggml_sycl_op_hardswish(ggml_backend_sycl_context & ctx, const ggml_t
615615

616616
hardswish_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
617617

618-
(void) src1;
619-
(void) dst;
620-
(void) src1_dd;
621-
(void) ctx;
618+
GGML_UNUSED(src1);
619+
GGML_UNUSED(dst);
620+
GGML_UNUSED(src1_dd);
621+
GGML_UNUSED(ctx);
622622
}
623623

624624
inline void ggml_sycl_op_exp(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -631,10 +631,10 @@ inline void ggml_sycl_op_exp(ggml_backend_sycl_context & ctx, const ggml_tensor
631631

632632
exp_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
633633

634-
(void) src1;
635-
(void) dst;
636-
(void) src1_dd;
637-
(void) ctx;
634+
GGML_UNUSED(src1);
635+
GGML_UNUSED(dst);
636+
GGML_UNUSED(src1_dd);
637+
GGML_UNUSED(ctx);
638638
}
639639

640640
inline void ggml_sycl_op_log(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -647,10 +647,10 @@ inline void ggml_sycl_op_log(ggml_backend_sycl_context & ctx, const ggml_tensor
647647

648648
log_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
649649

650-
(void) src1;
651-
(void) dst;
652-
(void) src1_dd;
653-
(void) ctx;
650+
GGML_UNUSED(src1);
651+
GGML_UNUSED(dst);
652+
GGML_UNUSED(src1_dd);
653+
GGML_UNUSED(ctx);
654654
}
655655

656656
inline void ggml_sycl_op_sigmoid(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -663,10 +663,10 @@ inline void ggml_sycl_op_sigmoid(ggml_backend_sycl_context & ctx, const ggml_ten
663663

664664
sigmoid_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
665665

666-
(void) src1;
667-
(void) dst;
668-
(void) src1_dd;
669-
(void) ctx;
666+
GGML_UNUSED(src1);
667+
GGML_UNUSED(dst);
668+
GGML_UNUSED(src1_dd);
669+
GGML_UNUSED(ctx);
670670
}
671671

672672
inline void ggml_sycl_op_sqrt(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -679,10 +679,10 @@ inline void ggml_sycl_op_sqrt(ggml_backend_sycl_context & ctx, const ggml_tensor
679679

680680
sqrt_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
681681

682-
(void) src1;
683-
(void) dst;
684-
(void) src1_dd;
685-
(void) ctx;
682+
GGML_UNUSED(src1);
683+
GGML_UNUSED(dst);
684+
GGML_UNUSED(src1_dd);
685+
GGML_UNUSED(ctx);
686686
}
687687

688688
inline void ggml_sycl_op_sin(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -695,10 +695,10 @@ inline void ggml_sycl_op_sin(ggml_backend_sycl_context & ctx, const ggml_tensor
695695

696696
sin_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
697697

698-
(void) src1;
699-
(void) dst;
700-
(void) src1_dd;
701-
(void) ctx;
698+
GGML_UNUSED(src1);
699+
GGML_UNUSED(dst);
700+
GGML_UNUSED(src1_dd);
701+
GGML_UNUSED(ctx);
702702
}
703703

704704
inline void ggml_sycl_op_cos(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -711,10 +711,10 @@ inline void ggml_sycl_op_cos(ggml_backend_sycl_context & ctx, const ggml_tensor
711711

712712
cos_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
713713

714-
(void) src1;
715-
(void) dst;
716-
(void) src1_dd;
717-
(void) ctx;
714+
GGML_UNUSED(src1);
715+
GGML_UNUSED(dst);
716+
GGML_UNUSED(src1_dd);
717+
GGML_UNUSED(ctx);
718718
}
719719

720720
inline void ggml_sycl_op_step(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -727,10 +727,10 @@ inline void ggml_sycl_op_step(ggml_backend_sycl_context & ctx, const ggml_tensor
727727

728728
step_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
729729

730-
(void) src1;
731-
(void) dst;
732-
(void) src1_dd;
733-
(void) ctx;
730+
GGML_UNUSED(src1);
731+
GGML_UNUSED(dst);
732+
GGML_UNUSED(src1_dd);
733+
GGML_UNUSED(ctx);
734734
}
735735

736736
inline void ggml_sycl_op_neg(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -743,10 +743,10 @@ inline void ggml_sycl_op_neg(ggml_backend_sycl_context & ctx, const ggml_tensor
743743

744744
neg_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
745745

746-
(void) src1;
747-
(void) dst;
748-
(void) src1_dd;
749-
(void) ctx;
746+
GGML_UNUSED(src1);
747+
GGML_UNUSED(dst);
748+
GGML_UNUSED(src1_dd);
749+
GGML_UNUSED(ctx);
750750
}
751751

752752
inline void ggml_sycl_op_leaky_relu(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -763,10 +763,10 @@ inline void ggml_sycl_op_leaky_relu(ggml_backend_sycl_context & ctx, const ggml_
763763

764764
leaky_relu_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), negative_slope, main_stream);
765765

766-
(void) src1;
767-
(void) dst;
768-
(void) src1_dd;
769-
(void) ctx;
766+
GGML_UNUSED(src1);
767+
GGML_UNUSED(dst);
768+
GGML_UNUSED(src1_dd);
769+
GGML_UNUSED(ctx);
770770
}
771771

772772
inline void ggml_sycl_op_sqr(ggml_backend_sycl_context & ctx, const ggml_tensor *src0, const ggml_tensor *src1,
@@ -779,10 +779,10 @@ inline void ggml_sycl_op_sqr(ggml_backend_sycl_context & ctx, const ggml_tensor
779779

780780
sqr_f32_sycl(src0_dd, dst_dd, ggml_nelements(src0), main_stream);
781781

782-
(void) src1;
783-
(void) dst;
784-
(void) src1_dd;
785-
(void) ctx;
782+
GGML_UNUSED(src1);
783+
GGML_UNUSED(dst);
784+
GGML_UNUSED(src1_dd);
785+
GGML_UNUSED(ctx);
786786
}
787787

788788
inline void ggml_sycl_op_upscale(ggml_backend_sycl_context & ctx, const ggml_tensor *src0,
@@ -803,10 +803,10 @@ inline void ggml_sycl_op_upscale(ggml_backend_sycl_context & ctx, const ggml_ten
803803
dst->ne[0], dst->ne[1], dst->ne[2], dst->ne[3], sf0, sf1, sf2, sf3,
804804
main_stream);
805805

806-
(void) src1;
807-
(void) dst;
808-
(void) src1_dd;
809-
(void) ctx;
806+
GGML_UNUSED(src1);
807+
GGML_UNUSED(dst);
808+
GGML_UNUSED(src1_dd);
809+
GGML_UNUSED(ctx);
810810
}
811811

812812
inline void ggml_sycl_op_pad(ggml_backend_sycl_context & ctx, const ggml_tensor *src0, const ggml_tensor *src1,
@@ -822,10 +822,10 @@ inline void ggml_sycl_op_pad(ggml_backend_sycl_context & ctx, const ggml_tensor
822822
src0->ne[0], src0->ne[1], src0->ne[2],
823823
dst->ne[0], dst->ne[1], dst->ne[2], main_stream);
824824

825-
(void) src1;
826-
(void) dst;
827-
(void) src1_dd;
828-
(void) ctx;
825+
GGML_UNUSED(src1);
826+
GGML_UNUSED(dst);
827+
GGML_UNUSED(src1_dd);
828+
GGML_UNUSED(ctx);
829829
}
830830

831831
inline void ggml_sycl_op_acc(ggml_backend_sycl_context & ctx, const ggml_tensor *src0, const ggml_tensor *src1,
@@ -845,8 +845,8 @@ inline void ggml_sycl_op_acc(ggml_backend_sycl_context & ctx, const ggml_tensor
845845

846846
acc_f32_sycl(src0_dd, src1_dd, dst_dd, ggml_nelements(dst), src1->ne[0], src1->ne[1], src1->ne[2], nb1, nb2, offset, main_stream);
847847

848-
(void) dst;
849-
(void) ctx;
848+
GGML_UNUSED(dst);
849+
GGML_UNUSED(ctx);
850850
}
851851

852852
inline void ggml_sycl_op_add(ggml_backend_sycl_context & ctx, const ggml_tensor *src0, const ggml_tensor *src1,

0 commit comments

Comments
 (0)