Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ggml/src/ggml-cpu/ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7322,9 +7322,9 @@ void ggml_compute_forward_flash_attn_ext_mixed(
const int64_t q_head_start = kv_head * rk2;
const int64_t q_head_end = q_head_start + rk2;

for (int64_t q_head = q_head_start; q_head < q_head_end; ++ q_head) {
for (int64_t q_head = q_head_start; q_head < q_head_end; ++ q_head) {
for (int64_t q_pos = 0; q_pos < SEQ_LEN; ++ q_pos) {
float* mp = (float*) mask->data + q_pos * nek1;
float* mp = (float*) ((char *) mask->data + q_pos * mask->nb[1]);
if (mp[kv_pos] == -INFINITY) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test-flash-decoding-custom-op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void fill_random_f32(ggml_tensor * dst, size_t n_rows, size_t n_cols, flo
GGML_TENSOR_LOCALS(int64_t, nedst, dst, ne)

float* data = (float*)dst->data;
size_t row_stride = nedst1;
size_t row_stride = nedst0;

static std::random_device rd;
static std::mt19937 gen(rd());
Expand Down