feat: add CLI flag to control communication and computation logging

This commit is contained in:
DaninPower
2025-08-02 12:55:12 +00:00
parent e00cef66ac
commit 96191d3b6f
6 changed files with 36 additions and 6 deletions
+7
View File
@@ -2066,6 +2066,13 @@ gpt_params_context gpt_params_parser_init(gpt_params & params, llama_example ex,
params.dump_folder = value;
}
));
add_opt(llama_arg(
{"--enable-comm-compute-log"},
"enable communication and computation logging for gantt chart analysis",
[](gpt_params & params) {
params.enable_comm_compute_log = true;
}
));
add_opt(llama_arg(
{"--positive-file"}, "FNAME",
format("positive prompts file, one prompt per line (default: '%s')", params.cvector_positive_file.c_str()),
+2
View File
@@ -2021,6 +2021,8 @@ struct llama_context_params llama_context_params_from_gpt_params(const gpt_param
cparams.dump_folder = nullptr;
}
cparams.enable_comm_compute_log = params.enable_comm_compute_log;
cparams.n_ctx = params.n_ctx;
cparams.n_predict = params.n_predict;
cparams.n_seq_max = params.n_parallel;
+3
View File
@@ -359,6 +359,9 @@ struct gpt_params {
// tensor dumping
std::string dump_folder = ""; // folder to dump network communication tensors
// communication and computation logging
bool enable_comm_compute_log = false; // enable/disable communication and computation logging
};
// call once at the start of a program if it uses libcommon