feat: add CLI flag to control communication and computation logging
This commit is contained in:
@@ -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()),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user