@@ -93,8 +93,9 @@ def summarize_results(logs_dir, args, start, finish):
9393 ["n_proc" , "n_threads" , "batch_size" , "prompt_size" , "output_tokens" , "pp_throughput_tps" ,
9494 "pp_avg_latency_sec" , "tg_throughput_tps" , "tg_avg_latency_sec" , "pp+tg_throughput_tps" , "concurrency" , "start" , "finish" ])
9595 writer .writerow (
96- [args .num_processes , args .num_threads , args .batch_size , args .prompt_size , TOKENS , pp_throughput ,
97- avg_pp_latency , tg_throughput , avg_tg_latency , avg_total_speed , args .batch_size * args .num_processes , start , finish ])
96+ [args .num_processes , args .num_threads , args .batch_size , args .prompt_size , TOKENS , f"{ pp_throughput :.3f} " ,
97+ f"{ avg_pp_latency :.3f} " , f"{ tg_throughput :.3f} " , f"{ avg_tg_latency :.3f} " , f"{ avg_total_speed :.3f} " , args .batch_size * args .num_processes , f"{ start :.3f} " , f"{ finish :.3f} " ])
98+
9899 print (f"Result saved in { results_filename } " )
99100
100101
@@ -118,12 +119,12 @@ def main():
118119 logfile = f"{ logs_dir } /log_{ n } "
119120 if os .path .exists ("/llm/batched-bench" ):
120121 # command-line for v1
121- cmd = ["numactl" , f"--physcpubind={ gen_threads_config (args .num_threads , n )} " ,
122+ cmd = ["numactl" , f"--physcpubind={ gen_threads_config (args .num_threads , n )} " , "--localalloc" ,
122123 "/llm/batched-bench" , args .model , str (args .kv_cache ), "2048" , "512" , "0" , "0" , "0" , str (args .prompt_size ), str (TOKENS ),
123124 str (args .batch_size ), str (args .num_threads )]
124125 elif os .path .exists ("/llm/llama-batched-bench" ):
125126 # command-line for v2
126- cmd = ["numactl" , f"--physcpubind={ gen_threads_config (args .num_threads , n )} " ,
127+ cmd = ["numactl" , f"--physcpubind={ gen_threads_config (args .num_threads , n )} " , "--localalloc" ,
127128 "/llm/llama-batched-bench" , "-m" , args .model , "-c" , str (args .kv_cache ), "-b" , "2048" , "-ub" , "512" , "-npp" , str (args .prompt_size ), "-ntg" , str (TOKENS ),
128129 "-npl" , str (args .batch_size ), "-t" , str (args .num_threads ), "-tb" , str (args .num_threads ), "-td" , str (args .num_threads )]
129130 else :
0 commit comments