@@ -116,9 +116,19 @@ def main():
116116 current_subprocesses = list ()
117117 for n in range (args .num_processes ):
118118 logfile = f"{ logs_dir } /log_{ n } "
119- cmd = ["numactl" , f"--physcpubind={ gen_threads_config (args .num_threads , n )} " ,
120- "/llm/batched-bench" , args .model , str (args .kv_cache ), "2048" , "512" , "0" , "0" , "0" , str (args .prompt_size ), str (TOKENS ),
121- str (args .batch_size ), str (args .num_threads )]
119+ if os .path .exists ("/llm/batched-bench" ):
120+ # command-line for v1
121+ cmd = ["numactl" , f"--physcpubind={ gen_threads_config (args .num_threads , n )} " ,
122+ "/llm/batched-bench" , args .model , str (args .kv_cache ), "2048" , "512" , "0" , "0" , "0" , str (args .prompt_size ), str (TOKENS ),
123+ str (args .batch_size ), str (args .num_threads )]
124+ elif os .path .exists ("/llm/llama-batched-bench" ):
125+ # command-line for v2
126+ cmd = ["numactl" , f"--physcpubind={ gen_threads_config (args .num_threads , n )} " ,
127+ "/llm/llama-batched-bench" , "-m" , args .model , "-c" , str (args .kv_cache ), "-b" , "2048" , "-ub" , "512" , "-npp" , str (args .prompt_size ), "-ntg" , str (TOKENS ),
128+ "-npl" , str (args .batch_size ), "-t" , str (args .num_threads ), "-tb" , str (args .num_threads ), "-td" , str (args .num_threads )]
129+ else :
130+ print ("FAIL: batched-bench not found!" )
131+ sys .exit (1 )
122132 current_subprocesses .append (
123133 subprocess .Popen (cmd , stdout = open (logfile , 'wb' ), stderr = open (logfile , 'wb' )))
124134 start = time .time ()
0 commit comments