@@ -177,7 +177,7 @@ def run_cuda_benchmark(num_iters: int, profile: bool = False) -> float:
177177 )
178178
179179 parser = FlexibleArgumentParser (description = "Benchmark the paged attention kernel." )
180- # parser.add_argument("--version", type=str, choices=["v1", "v2"], default="v2")
180+ parser .add_argument ("--version" , type = str , choices = ["v1" , "v2" ], default = "v2" )
181181 parser .add_argument ("--batch-size" , type = int , default = 8 )
182182 parser .add_argument ("--seq-len" , type = int , default = 4096 )
183183 parser .add_argument ("--num-query-heads" , type = int , default = 64 )
@@ -190,14 +190,11 @@ def run_cuda_benchmark(num_iters: int, profile: bool = False) -> float:
190190 )
191191 parser .add_argument ("--block-size" , type = int , choices = [16 , 32 ], default = 16 )
192192 parser .add_argument ("--use-alibi" , action = "store_true" )
193- '''
194193 parser .add_argument (
195194 "--dtype" , type = str , choices = ["half" , "bfloat16" , "float" ], default = "half"
196195 )
197- '''
198196 parser .add_argument ("--seed" , type = int , default = 0 )
199197 parser .add_argument ("--profile" , action = "store_true" )
200- '''
201198 parser .add_argument (
202199 "--kv-cache-dtype" ,
203200 type = str ,
@@ -210,7 +207,6 @@ def run_cuda_benchmark(num_iters: int, profile: bool = False) -> float:
210207 parser .add_argument (
211208 "--custom-paged-attn" , action = "store_true" , help = "Use custom paged attention"
212209 )
213- '''
214210 args = parser .parse_args ()
215211 print (args )
216212
@@ -225,7 +221,7 @@ def run_cuda_benchmark(num_iters: int, profile: bool = False) -> float:
225221 head_size = args .head_size ,
226222 block_size = args .block_size ,
227223 use_alibi = args .use_alibi ,
228- dtype = STR_DTYPE_TO_TORCH_DTYPE ["fp8" ],
224+ dtype = STR_DTYPE_TO_TORCH_DTYPE [args . dtype ],
229225 seed = args .seed ,
230226 do_profile = args .profile ,
231227 kv_cache_dtype = "auto" ,
0 commit comments