@@ -539,6 +539,11 @@ extern "C" {
539
539
struct ggml_tensor * a ,
540
540
struct ggml_tensor * b );
541
541
542
+ GGML_API struct ggml_tensor * ggml_add1_inplace (
543
+ struct ggml_context * ctx ,
544
+ struct ggml_tensor * a ,
545
+ struct ggml_tensor * b );
546
+
542
547
GGML_API struct ggml_tensor * ggml_acc (
543
548
struct ggml_context * ctx ,
544
549
struct ggml_tensor * a ,
@@ -562,24 +567,47 @@ extern "C" {
562
567
struct ggml_tensor * a ,
563
568
struct ggml_tensor * b );
564
569
570
+ GGML_API struct ggml_tensor * ggml_sub_inplace (
571
+ struct ggml_context * ctx ,
572
+ struct ggml_tensor * a ,
573
+ struct ggml_tensor * b );
574
+
565
575
GGML_API struct ggml_tensor * ggml_mul (
566
576
struct ggml_context * ctx ,
567
577
struct ggml_tensor * a ,
568
578
struct ggml_tensor * b );
569
579
580
+ GGML_API struct ggml_tensor * ggml_mul_inplace (
581
+ struct ggml_context * ctx ,
582
+ struct ggml_tensor * a ,
583
+ struct ggml_tensor * b );
584
+
570
585
GGML_API struct ggml_tensor * ggml_div (
571
586
struct ggml_context * ctx ,
572
587
struct ggml_tensor * a ,
573
588
struct ggml_tensor * b );
574
589
590
+ GGML_API struct ggml_tensor * ggml_div_inplace (
591
+ struct ggml_context * ctx ,
592
+ struct ggml_tensor * a ,
593
+ struct ggml_tensor * b );
594
+
575
595
GGML_API struct ggml_tensor * ggml_sqr (
576
596
struct ggml_context * ctx ,
577
597
struct ggml_tensor * a );
578
598
599
+ GGML_API struct ggml_tensor * ggml_sqr_inplace (
600
+ struct ggml_context * ctx ,
601
+ struct ggml_tensor * a );
602
+
579
603
GGML_API struct ggml_tensor * ggml_sqrt (
580
604
struct ggml_context * ctx ,
581
605
struct ggml_tensor * a );
582
606
607
+ GGML_API struct ggml_tensor * ggml_sqrt_inplace (
608
+ struct ggml_context * ctx ,
609
+ struct ggml_tensor * a );
610
+
583
611
GGML_API struct ggml_tensor * ggml_log (
584
612
struct ggml_context * ctx ,
585
613
struct ggml_tensor * a );
@@ -614,31 +642,59 @@ extern "C" {
614
642
struct ggml_context * ctx ,
615
643
struct ggml_tensor * a );
616
644
645
+ GGML_API struct ggml_tensor * ggml_abs_inplace (
646
+ struct ggml_context * ctx ,
647
+ struct ggml_tensor * a );
648
+
617
649
GGML_API struct ggml_tensor * ggml_sgn (
618
650
struct ggml_context * ctx ,
619
651
struct ggml_tensor * a );
620
652
653
+ GGML_API struct ggml_tensor * ggml_sgn_inplace (
654
+ struct ggml_context * ctx ,
655
+ struct ggml_tensor * a );
656
+
621
657
GGML_API struct ggml_tensor * ggml_neg (
622
658
struct ggml_context * ctx ,
623
659
struct ggml_tensor * a );
624
660
661
+ GGML_API struct ggml_tensor * ggml_neg_inplace (
662
+ struct ggml_context * ctx ,
663
+ struct ggml_tensor * a );
664
+
625
665
GGML_API struct ggml_tensor * ggml_step (
626
666
struct ggml_context * ctx ,
627
667
struct ggml_tensor * a );
628
668
669
+ GGML_API struct ggml_tensor * ggml_step_inplace (
670
+ struct ggml_context * ctx ,
671
+ struct ggml_tensor * a );
672
+
629
673
GGML_API struct ggml_tensor * ggml_relu (
630
674
struct ggml_context * ctx ,
631
675
struct ggml_tensor * a );
632
676
677
+ GGML_API struct ggml_tensor * ggml_relu_inplace (
678
+ struct ggml_context * ctx ,
679
+ struct ggml_tensor * a );
680
+
633
681
// TODO: double-check this computation is correct
634
682
GGML_API struct ggml_tensor * ggml_gelu (
635
683
struct ggml_context * ctx ,
636
684
struct ggml_tensor * a );
637
685
686
+ GGML_API struct ggml_tensor * ggml_gelu_inplace (
687
+ struct ggml_context * ctx ,
688
+ struct ggml_tensor * a );
689
+
638
690
GGML_API struct ggml_tensor * ggml_silu (
639
691
struct ggml_context * ctx ,
640
692
struct ggml_tensor * a );
641
693
694
+ GGML_API struct ggml_tensor * ggml_silu_inplace (
695
+ struct ggml_context * ctx ,
696
+ struct ggml_tensor * a );
697
+
642
698
// a - x
643
699
// b - dy
644
700
GGML_API struct ggml_tensor * ggml_silu_back (
@@ -652,10 +708,18 @@ extern "C" {
652
708
struct ggml_context * ctx ,
653
709
struct ggml_tensor * a );
654
710
711
+ GGML_API struct ggml_tensor * ggml_norm_inplace (
712
+ struct ggml_context * ctx ,
713
+ struct ggml_tensor * a );
714
+
655
715
GGML_API struct ggml_tensor * ggml_rms_norm (
656
716
struct ggml_context * ctx ,
657
717
struct ggml_tensor * a );
658
718
719
+ GGML_API struct ggml_tensor * ggml_rms_norm_inplace (
720
+ struct ggml_context * ctx ,
721
+ struct ggml_tensor * a );
722
+
659
723
// a - x
660
724
// b - dy
661
725
GGML_API struct ggml_tensor * ggml_rms_norm_back (
0 commit comments