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

ggml : change ggml_graph_compute() API to not require context #1999

Merged
merged 20 commits into from
Jul 7, 2023
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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 : fix docs
  • Loading branch information
ggerganov committed Jul 6, 2023
commit 4646cc2cf16bdece6ba87b6444fe8b02e87f1c5b
18 changes: 10 additions & 8 deletions ggml.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,17 @@
// ggml_set_f32(a, 3.0f);
// ggml_set_f32(b, 4.0f);
//
// const int n_threads = 1;
// struct ggml_graph_compute_plan plan = ggml_graph_compute_make_plan(&gf, n_threads);
// if (plan.work_size > 0) {
// plan.work_data = malloc(plan.work_size);
// GGML_ASSERT(plan.work_data);
// struct ggml_cplan pf = ggml_graph_compute_make_plan(&gf, n_threads);
//
// if (pf.work_size > 0) {
// pf.work_data = malloc(pf.work_size);
// GGML_ASSERT(pf.work_data);
// }
// ggml_graph_compute(&plan, &gf);
// if (plan.work_data) {
// free(plan.work_data);
//
// ggml_graph_compute(&gf, &pf);
//
// if (pf.work_data) {
// free(pf.work_data);
// }
//
// printf("f = %f\n", ggml_get_f32_1d(f, 0));
Expand Down
Loading