ggml : fix pos ptr when no ALiBi
ggml-ci
This commit is contained in:
parent
e3d4b99a9e
commit
b2c055b8af
1 changed files with 2 additions and 1 deletions
3
ggml.c
3
ggml.c
|
@ -11518,7 +11518,8 @@ static void ggml_compute_forward_soft_max_f32(
|
|||
|
||||
float * wp = (float *) params->wdata + (nc + CACHE_LINE_SIZE_F32) * ith;
|
||||
|
||||
float * pos = (float *) src2->data;
|
||||
// when max_bias <= 0.0f, src2 is not used and we default it to src0 to avoid branching
|
||||
float * pos = src2 ? (float *) src2->data : src0->data;
|
||||
|
||||
for (int i1 = ir0; i1 < ir1; i1++) {
|
||||
float * sp = (float *)((char *) src0->data + i1*src0->nb[1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue