File tree Expand file tree Collapse file tree
aiu_fms_testing_utils/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 138138 default = "inductor" ,
139139 choices = ["inductor" , "eager" , "aot_eager" ],
140140)
141+ parser .add_argument (
142+ "--compile_backend_aiu" ,
143+ type = str ,
144+ help = "Backend for AIU compilation" ,
145+ default = "sendnn" ,
146+ choices = ["sendnn" , "sendnn_compile_only" ],
147+ )
141148parser .add_argument (
142149 "--compile_dynamic" ,
143150 action = "store_true" ,
387394 print ("must set AIU_WORLD_RANK_0" )
388395 exit ()
389396 os .environ .setdefault ("FLEX_COMPUTE" , "SENTIENT" )
390- os .environ .setdefault ("FLEX_DEVICE" , "PF" )
397+ if args .compile_backend_aiu == "compile_only_backend" :
398+ os .environ .setdefault ("FLEX_DEVICE" , "COMPILE" )
399+ else :
400+ os .environ .setdefault ("FLEX_DEVICE" , "PF" )
391401
392402 device = torch .device ("cpu" )
393403else :
@@ -597,7 +607,7 @@ def select_int8_module(
597607 fx_config .backed_size_oblivious = "paged" in attn_name
598608 if is_aiu_backend :
599609 model .compile (
600- backend = "sendnn" , options = {"sendnn.dynamic" : args .compile_dynamic_sendnn }
610+ backend = args . compile_backend_aiu , options = {"sendnn.dynamic" : args .compile_dynamic_sendnn }
601611 )
602612 else :
603613 # compiling can make first inference pass slow
You can’t perform that action at this time.
0 commit comments