metal : simplify soft_max encoding

ggml-ci
This commit is contained in:
Georgi Gerganov 2023-11-29 17:30:19 +02:00
parent 390a445906
commit 580fe2064c
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
2 changed files with 2 additions and 7 deletions

View file

@ -1040,12 +1040,7 @@ void ggml_metal_graph_compute(
const float scale = ((float *) dst->op_params)[0];
[encoder setBuffer:id_src0 offset:offs_src0 atIndex:0];
if (id_src1) {
[encoder setBuffer:id_src1 offset:offs_src1 atIndex:1];
} else {
[encoder setBuffer:nil offset:0 atIndex:1];
}
[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];