1717from  history  import  BenchmarkHistory 
1818from  utils .utils  import  prepare_workdir 
1919from  utils .compute_runtime  import  * 
20+ from  presets  import  preset_get_by_name , presets 
2021
2122import  argparse 
2223import  re 
@@ -153,7 +154,7 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):
153154            SyclBench (directory ),
154155            LlamaCppBench (directory ),
155156            UMFSuite (directory ),
156-             #  TestSuite()
157+             TestSuite (), 
157158        ]
158159        if  not  options .dry_run 
159160        else  []
@@ -163,6 +164,9 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):
163164    failures  =  {}
164165
165166    for  s  in  suites :
167+         if  s .name () not  in   options .preset .suites ():
168+             continue 
169+ 
166170        suite_benchmarks  =  s .benchmarks ()
167171        if  filter :
168172            suite_benchmarks  =  [
@@ -182,14 +186,13 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):
182186                print (f"{ type (s ).__name__ }   setup complete." )
183187                benchmarks  +=  suite_benchmarks 
184188
185-     for  b  in  benchmarks :
186-         print (b .name ())
187- 
188189    for  benchmark  in  benchmarks :
189190        try :
190-             print (f"Setting up { benchmark .name ()}  ... " )
191+             if  options .verbose :
192+                 print (f"Setting up { benchmark .name ()}  ... " )
191193            benchmark .setup ()
192-             print (f"{ benchmark .name ()}   setup complete." )
194+             if  options .verbose :
195+                 print (f"{ benchmark .name ()}   setup complete." )
193196
194197        except  Exception  as  e :
195198            if  options .exit_on_failure :
@@ -279,8 +282,6 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):
279282    if  options .output_html :
280283        generate_html (history .runs , compare_names )
281284
282-         print (f"See { os .getcwd ()}  /html/index.html for the results." )
283- 
284285
285286def  validate_and_parse_env_args (env_args ):
286287    env_vars  =  {}
@@ -362,12 +363,6 @@ def validate_and_parse_env_args(env_args):
362363        help = "Regex pattern to filter benchmarks by name." ,
363364        default = None ,
364365    )
365-     parser .add_argument (
366-         "--epsilon" ,
367-         type = float ,
368-         help = "Threshold to consider change of performance significant" ,
369-         default = options .epsilon ,
370-     )
371366    parser .add_argument (
372367        "--verbose" , help = "Print output of all the commands." , action = "store_true" 
373368    )
@@ -394,7 +389,11 @@ def validate_and_parse_env_args(env_args):
394389        help = "Specify whether markdown output should fit the content size limit for request validation" ,
395390    )
396391    parser .add_argument (
397-         "--output-html" , help = "Create HTML output" , action = "store_true" , default = False 
392+         "--output-html" ,
393+         help = "Create HTML output. Local output is for direct local viewing of the html file, remote is for server deployment." ,
394+         nargs = "?" ,
395+         const = options .output_html ,
396+         choices = ["local" , "remote" ],
398397    )
399398    parser .add_argument (
400399        "--dry-run" ,
@@ -438,6 +437,13 @@ def validate_and_parse_env_args(env_args):
438437        help = "Directory for cublas library" ,
439438        default = None ,
440439    )
440+     parser .add_argument (
441+         "--preset" ,
442+         type = str ,
443+         choices = [p .name () for  p  in  presets ],
444+         help = "Benchmark preset to run." ,
445+         default = options .preset .name (),
446+     )
441447
442448    args  =  parser .parse_args ()
443449    additional_env_vars  =  validate_and_parse_env_args (args .env )
@@ -449,7 +455,6 @@ def validate_and_parse_env_args(env_args):
449455    options .sycl  =  args .sycl 
450456    options .iterations  =  args .iterations 
451457    options .timeout  =  args .timeout 
452-     options .epsilon  =  args .epsilon 
453458    options .ur  =  args .ur 
454459    options .ur_adapter  =  args .adapter 
455460    options .exit_on_failure  =  args .exit_on_failure 
@@ -464,6 +469,7 @@ def validate_and_parse_env_args(env_args):
464469    options .current_run_name  =  args .relative_perf 
465470    options .cudnn_directory  =  args .cudnn_directory 
466471    options .cublas_directory  =  args .cublas_directory 
472+     options .preset  =  preset_get_by_name (args .preset )
467473
468474    if  args .build_igc  and  args .compute_runtime  is  None :
469475        parser .error ("--build-igc requires --compute-runtime to be set" )
0 commit comments