@@ -25,10 +25,11 @@ def parse_args():
2525 """
2626 parser = ArgumentParser (description = "command-launch a Python script with quantization auto-enabled" )
2727
28- parser .add_argument ("--opt" , type = str , default = "" ,
28+ parser .add_argument ("-o" , "- -opt" , type = str , default = "" ,
2929 help = "optimization feature to enable" )
3030
31- parser .add_argument ("--approach" , type = str , default = "dynamic" ,
31+ parser .add_argument ("-a" , "--approach" , type = str , default = "static" ,
32+
3233 help = "quantization approach (strategy)" )
3334
3435 parser .add_argument ('--config' , type = str , default = "" ,
@@ -54,13 +55,15 @@ def parse_args():
5455from neural_coder import enable
5556if args .opt == "" :
5657 if args .approach == "static" :
57- features = ["pytorch_inc_static_quant_fx" ]
58+ features = ["pytorch_inc_static_quant_fx" ]
5859 if args .approach == "static_ipex" :
59- features = ["pytorch_inc_static_quant_ipex" ]
60+ features = ["pytorch_inc_static_quant_ipex" ]
6061 if args .approach == "dynamic" :
61- features = ["pytorch_inc_dynamic_quant" ]
62+ features = ["pytorch_inc_dynamic_quant" ]
6263else :
63- features = [args .opt ]
64+ features = args .opt .split ("," )
65+
66+ # execute optimization enabling
6467enable (
6568 code = script_copied ,
6669 features = features ,
0 commit comments