Skip to content

Commit

Permalink
metal : fix soft_max kernel src1 argument (#1602)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Dec 8, 2023
1 parent afce6fa commit 7bc4d22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ggml-metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,9 @@ void ggml_metal_graph_compute(
const float scale = ((float *) dst->op_params)[0];

[encoder setBuffer:id_src0 offset:offs_src0 atIndex:0];
[encoder setBuffer:id_src1 offset:offs_src1 atIndex:1];
if (id_src1) {
[encoder setBuffer:id_src1 offset:offs_src1 atIndex:1];
}
[encoder setBuffer:id_dst offset:offs_dst atIndex:2];
[encoder setBytes:&ne00 length:sizeof(ne00) atIndex:3];
[encoder setBytes:&ne01 length:sizeof(ne01) atIndex:4];
Expand Down

0 comments on commit 7bc4d22

Please sign in to comment.