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
2 changes: 1 addition & 1 deletion ggml/include/ggml-profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GGML_API void ggml_profile_log_op_begin(struct ggml_tensor * tensor, int ith, in
GGML_API void ggml_profile_log_op_end(struct ggml_tensor * tensor, int ith, int nth);
GGML_API void ggml_profile_log_spacemit_op_begin(struct ggml_tensor * tensor, int ith, int nth);
GGML_API void ggml_profile_log_spacemit_op_end(struct ggml_tensor * tensor, int ith, int nth);
void ggml_profile_flush_tls(void);
GGML_API void ggml_profile_flush_tls(void);
#else
#define g_current_token_idx 0
#define ggml_profile_init_trace_file() ((void) 0)
Expand Down
2 changes: 2 additions & 0 deletions ggml/src/ggml-spacemit/ggml-spacemit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ static ggml_status ggml_backend_spacemit_graph_compute(ggml_backend_t backend, g
ctx.sync();
}

// Flush each worker before returning to the runtime pool.
ggml_profile_flush_tls();
ctx.clear();
}
);
Expand Down
4 changes: 0 additions & 4 deletions ggml/src/ggml-spacemit/ime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1860,10 +1860,6 @@ class tensor_traits_f16 : public ggml::spacemit::tensor_traits_base {
const int ith = ctx.ith;
const int nth = ctx.nth;

if (ith == 0 && getenv("GGML_SPACEMIT_Q41_TRACE") != nullptr) {
fprintf(stderr, "q41_mul_mat: N=%zu M=%zu K=%zu (%s)\n", N, M, K, M == 1 ? "decode" : "prefill");
}

const size_t out_row_stride = dst->nb[1]; // bytes

constexpr size_t m_tile = F16_M_TILE;
Expand Down
Loading