@@ -318,6 +318,44 @@ ggml_metal_pipeline_t ggml_metal_library_get_pipeline_sum_rows(ggml_metal_librar
318318 return res;
319319}
320320
321+ ggml_metal_pipeline_t ggml_metal_library_get_pipeline_cumsum_blk (ggml_metal_library_t lib, const ggml_tensor * op) {
322+ GGML_ASSERT (op->op == GGML_OP_CUMSUM );
323+
324+ char base[256 ];
325+ char name[256 ];
326+
327+ snprintf (base, 256 , " kernel_cumsum_blk_%s" , ggml_type_name (op->src [0 ]->type ));
328+ snprintf (name, 256 , " %s" , base);
329+
330+ ggml_metal_pipeline_t res = ggml_metal_library_get_pipeline (lib, name);
331+ if (res) {
332+ return res;
333+ }
334+
335+ res = ggml_metal_library_compile_pipeline (lib, base, name, nullptr );
336+
337+ return res;
338+ }
339+
340+ ggml_metal_pipeline_t ggml_metal_library_get_pipeline_cumsum_add (ggml_metal_library_t lib, const ggml_tensor * op) {
341+ GGML_ASSERT (op->op == GGML_OP_CUMSUM );
342+
343+ char base[256 ];
344+ char name[256 ];
345+
346+ snprintf (base, 256 , " kernel_cumsum_add_%s" , ggml_type_name (op->src [0 ]->type ));
347+ snprintf (name, 256 , " %s" , base);
348+
349+ ggml_metal_pipeline_t res = ggml_metal_library_get_pipeline (lib, name);
350+ if (res) {
351+ return res;
352+ }
353+
354+ res = ggml_metal_library_compile_pipeline (lib, base, name, nullptr );
355+
356+ return res;
357+ }
358+
321359ggml_metal_pipeline_t ggml_metal_library_get_pipeline_soft_max (ggml_metal_library_t lib, const ggml_tensor * op) {
322360 GGML_ASSERT (!op->src [1 ] || op->src [1 ]->type == GGML_TYPE_F16 || op->src [1 ]->type == GGML_TYPE_F32 );
323361
0 commit comments