Skip to content

Commit b19c244

Browse files
Gitty Bursteinyael-worksGittyBurstein
committed
feat: implement SparseK attention core logic
Co-authored-by: Yael <[email protected]> Co-authored-by: Gitty <[email protected]>
1 parent 5fa78a2 commit b19c244

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

ggml/include/ggml.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,9 +2234,9 @@ extern "C" {
22342234

22352235
GGML_API struct ggml_tensor * ggml_sparsek_attn(
22362236
struct ggml_context * ctx,
2237-
struct ggml_tensor * Q,
2238-
struct ggml_tensor * K,
2239-
struct ggml_tensor * V,
2237+
struct ggml_tensor * Q,
2238+
struct ggml_tensor * K,
2239+
struct ggml_tensor * V,
22402240
int32_t k_top,
22412241
int32_t win_local,
22422242
int32_t stride_global);

ggml/src/ggml-cpu/ggml-cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ static void ggml_compute_forward(struct ggml_compute_params * params, struct ggm
19551955
case GGML_OP_SPARSEK_ATTN:
19561956
{
19571957
ggml_compute_forward_sparsek_attn(params, tensor);
1958-
} break;
1958+
} break;
19591959
case GGML_OP_FLASH_ATTN_BACK:
19601960
{
19611961
int32_t t = ggml_get_op_params_i32(tensor, 0);

tests/test-backend-ops.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7251,7 +7251,6 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
72517251
// Test cases for performance evaluation: should be representative of real-world use cases
72527252
static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
72537253
std::vector<std::unique_ptr<test_case>> test_cases;
7254-
72557254
// Conv2d: K=CRS=NPQ=4096 matmul performance
72567255
uint32_t iwh_idx = 0;
72577256
uint32_t kwh_idx = 1;

0 commit comments

Comments
 (0)