Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numa #1556

Merged
merged 20 commits into from
Jun 26, 2023
Merged

Numa #1556

Changes from 1 commit
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
Prev Previous commit
Next Next commit
ggml : minor style + try fix sanitizer build
  • Loading branch information
ggerganov committed Jun 19, 2023
commit 67ba34e88feabbba43db5932ee7f05ac56c3b575
11 changes: 6 additions & 5 deletions ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -16299,13 +16299,15 @@ void clear_numa_thread_affinity(void) {}

struct ggml_compute_state_shared {
struct ggml_cgraph * cgraph;

int64_t perf_node_start_cycles;
int64_t perf_node_start_time_us;

int n_threads;

// synchronization primitives
atomic_int n_active; // num active threads
atomic_int node_n; // active graph node
atomic_int node_n; // active graph node
};

struct ggml_compute_state {
Expand All @@ -16314,13 +16316,12 @@ struct ggml_compute_state {
struct ggml_compute_state_shared * shared;
};

inline void ggml_graph_compute_perf_stats_node(struct ggml_tensor * node, const struct ggml_compute_state_shared * st)
{
int64_t cycles_cur = ggml_perf_cycles() - st->perf_node_start_cycles;
static void ggml_graph_compute_perf_stats_node(struct ggml_tensor * node, const struct ggml_compute_state_shared * st) {
int64_t cycles_cur = ggml_perf_cycles() - st->perf_node_start_cycles;
int64_t time_us_cur = ggml_perf_time_us() - st->perf_node_start_time_us;

node->perf_runs++;
node->perf_cycles += cycles_cur;
node->perf_cycles += cycles_cur;
node->perf_time_us += time_us_cur;
}

Expand Down