Skip to content

Commit

Permalink
metal : parallel command buffer encoding (ggerganov#1860)
Browse files Browse the repository at this point in the history
* metal : parallel command buffer encoding

* metal : determine number of command buffers based on gf->n_threads
  • Loading branch information
ggerganov authored Jun 15, 2023
1 parent 6b8312e commit 4bfcc85
Show file tree
Hide file tree
Showing 2 changed files with 540 additions and 516 deletions.
1 change: 1 addition & 0 deletions ggml-metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void ggml_metal_set_tensor(struct ggml_metal_context * ctx, struct ggml_tensor *
void ggml_metal_get_tensor(struct ggml_metal_context * ctx, struct ggml_tensor * t);

// same as ggml_graph_compute but uses Metal
// creates gf->n_threads command buffers in parallel
void ggml_metal_graph_compute(struct ggml_metal_context * ctx, struct ggml_cgraph * gf);

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 4bfcc85

Please sign in to comment.