@@ -244,22 +244,19 @@ def rewrite(
244244 }
245245 if softcap :
246246 gqa_attrs ["softcap" ] = softcap
247- outputs = op .op_multi_out (
248- "GroupQueryAttention" ,
249- inputs = [
250- q_pre ,
251- k_pre ,
252- v ,
253- past_key ,
254- past_value ,
255- self ._seqlens_k ,
256- self ._total_seq_len ,
257- self ._cos_cache ,
258- self ._sin_cache ,
259- ],
260- domain = "com.microsoft" ,
261- attributes = gqa_attrs ,
262- num_outputs = 3 ,
247+ outputs = op .GroupQueryAttention (
248+ q_pre ,
249+ k_pre ,
250+ v ,
251+ past_key ,
252+ past_value ,
253+ self ._seqlens_k ,
254+ self ._total_seq_len ,
255+ self ._cos_cache ,
256+ self ._sin_cache ,
257+ _domain = "com.microsoft" ,
258+ _outputs = 3 ,
259+ ** gqa_attrs ,
263260 )
264261
265262 return outputs [0 ], outputs [1 ], outputs [2 ]
@@ -377,17 +374,14 @@ def rewrite(
377374 gqa_node = gqa_out .producer ()
378375 attrs = {key : gqa_node .attributes [key ].value for key in gqa_node .attributes }
379376
380- outputs = op .op_multi_out (
381- "GroupQueryAttention" ,
382- inputs = [
383- packed_qkv ,
384- None ,
385- None ,
386- * gqa_node .inputs [3 :],
387- ],
388- domain = "com.microsoft" ,
389- attributes = attrs ,
390- num_outputs = 3 ,
377+ outputs = op .GroupQueryAttention (
378+ packed_qkv ,
379+ None ,
380+ None ,
381+ * gqa_node .inputs [3 :],
382+ _domain = "com.microsoft" ,
383+ _outputs = 3 ,
384+ ** attrs ,
391385 )
392386
393387 return outputs [0 ], outputs [1 ], outputs [2 ]
@@ -507,17 +501,14 @@ def rewrite(
507501 gqa_node = gqa_out .producer ()
508502 attrs = {key : gqa_node .attributes [key ].value for key in gqa_node .attributes }
509503
510- outputs = op .op_multi_out (
511- "GroupQueryAttention" ,
512- inputs = [
513- packed_qkv ,
514- None ,
515- None ,
516- * gqa_node .inputs [3 :],
517- ],
518- domain = "com.microsoft" ,
519- attributes = attrs ,
520- num_outputs = 3 ,
504+ outputs = op .GroupQueryAttention (
505+ packed_qkv ,
506+ None ,
507+ None ,
508+ * gqa_node .inputs [3 :],
509+ _domain = "com.microsoft" ,
510+ _outputs = 3 ,
511+ ** attrs ,
521512 )
522513
523514 return outputs [0 ], outputs [1 ], outputs [2 ]
@@ -655,12 +646,17 @@ def rewrite(
655646 if softcap :
656647 gqa_attrs ["softcap" ] = softcap
657648
658- outputs = op .op_multi_out (
659- "GroupQueryAttention" ,
660- inputs = [q , k , v , past_key , past_value , self ._seqlens_k , self ._total_seq_len ],
661- domain = "com.microsoft" ,
662- attributes = gqa_attrs ,
663- num_outputs = 3 ,
649+ outputs = op .GroupQueryAttention (
650+ q ,
651+ k ,
652+ v ,
653+ past_key ,
654+ past_value ,
655+ self ._seqlens_k ,
656+ self ._total_seq_len ,
657+ _domain = "com.microsoft" ,
658+ _outputs = 3 ,
659+ ** gqa_attrs ,
664660 )
665661 return outputs [0 ], outputs [1 ], outputs [2 ]
666662
0 commit comments