ggml : update comments [no ci]

This commit is contained in:
Georgi Gerganov 2024-09-11 13:16:39 +03:00
parent 119e0bc9ae
commit f9968f661d
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
3 changed files with 5 additions and 4 deletions

View File

@ -2064,7 +2064,7 @@ extern "C" {
// =================================================================================================
// CPU-only API for ggml_cgraph
//
// TODO: move as a separate backend
// TODO: move to the CPU backend
// NOTE: avoid using, will be removed
//

View File

@ -751,10 +751,9 @@ GGML_CALL static ggml_backend_buffer_type_t ggml_backend_cpu_get_default_buffer_
GGML_UNUSED(backend);
}
// TODO: this struct should no longer be needed
// instead, the new ggml_graph_work_init() + ggml_graph_work_free() API should be enough to replace this
// for now, keeping the implementation as it is, to avoid making a mistake
struct ggml_backend_plan_cpu {
// TODO: move member from ggml_cgraph here when the public CPU-only API is removed
struct ggml_cgraph cgraph;
};

View File

@ -774,6 +774,8 @@ struct ggml_cgraph {
enum ggml_cgraph_eval_order order;
// TODO: after the CPU-only API is removed, we can move the members below to ggml_backend_plan_cpu
bool work_own;
size_t work_size; // size of work buffer, calculated by `ggml_graph_plan()`
uint8_t * work_data; // work buffer, to be allocated by caller before calling to `ggml_graph_compute()`