@@ -72,6 +72,7 @@ def __init__(
7272 "iluvatar" : "iluvatar" ,
7373 "kunlun" : "kunlun" ,
7474 "hygon" : "hygon" ,
75+ "qy" : "cuda" ,
7576 }
7677
7778 device_name = device_map .get (device_type_str .lower (), "cpu" )
@@ -236,6 +237,8 @@ def __init__(self, model_dir_path, device_type_str="cpu", benchmark="ceval"):
236237 # Device
237238 if device_type_str == "nvidia" :
238239 self .device = torch .device ("cuda" )
240+ elif device_type_str == "qy" :
241+ self .device = torch .device ("cuda" )
239242 elif device_type_str == "cpu" :
240243 self .device = torch .device ("cpu" )
241244 elif device_type_str == "cambricon" :
@@ -646,7 +649,7 @@ def test():
646649 # Parse arguments manually to handle device flags properly
647650 if len (sys .argv ) < 4 :
648651 print (
649- "Usage: python test_benchmark.py [--cpu | --nvidia| --cambricon | --ascend | --metax | --moore | --iluvatar | --kunlun | --hygon] <path/to/model_dir> --bench [ceval|mmlu] [--backend cpp|torch] [--ndev N] [--subject SUBJECT] [--split {test|val|all}] [--num_samples N] [--max_new_tokens N] [--output_csv PATH] [--cache_dir PATH]"
652+ "Usage: python test_benchmark.py [--cpu | --nvidia| --qy | -- cambricon | --ascend | --metax | --moore | --iluvatar | --kunlun | --hygon] <path/to/model_dir> --bench [ceval|mmlu] [--backend cpp|torch] [--ndev N] [--subject SUBJECT] [--split {test|val|all}] [--num_samples N] [--max_new_tokens N] [--output_csv PATH] [--cache_dir PATH]"
650653 )
651654 sys .exit (1 )
652655
@@ -725,9 +728,11 @@ def test():
725728 device_type_str = "kunlun"
726729 elif device_flag == "--hygon" :
727730 device_type_str = "hygon"
731+ elif device_flag == "--qy" :
732+ device_type_str = "qy"
728733 else :
729734 print (
730- "Usage: python test_benchmark.py [--cpu | --nvidia| --cambricon | --ascend | --metax | --moore | --iluvatar | --kunlun | --hygon] <path/to/model_dir> --bench [ceval|mmlu] [--backend cpp|torch] [--ndev N] [--subject SUBJECT] [--num_samples N] [--max_new_tokens N] [--output_csv PATH] [--cache_dir PATH]"
735+ "Usage: python test_benchmark.py [--cpu | --nvidia| --qy | -- cambricon | --ascend | --metax | --moore | --iluvatar | --kunlun | --hygon] <path/to/model_dir> --bench [ceval|mmlu] [--backend cpp|torch] [--ndev N] [--subject SUBJECT] [--num_samples N] [--max_new_tokens N] [--output_csv PATH] [--cache_dir PATH]"
731736 )
732737 sys .exit (1 )
733738
0 commit comments