@@ -640,26 +640,11 @@ def _get_forward_metadata_across_dp_and_pad(
640640 self , num_tokens : int , with_prefill : bool , enable_dbo : bool
641641 ) -> tuple [int , Optional [torch .Tensor ], bool , bool ]:
642642 if self .dp_size == 1 :
643- if self .torchair_graph_enabled and not with_prefill :
644- maybe_padded_num_tokens = self .select_torchair_padded_batch_size (
645- num_tokens )
646- return maybe_padded_num_tokens , None , with_prefill , enable_dbo
647643 return num_tokens , None , with_prefill , enable_dbo
648644
649- maybe_padded_num_tokens = num_tokens
650645 num_tokens_across_dp , with_prefill , enable_dbo = self ._get_forward_metadata_across_dp (
651646 num_tokens , with_prefill , enable_dbo )
652-
653- if self .torchair_graph_enabled and not with_prefill :
654- max_num_token = num_tokens_across_dp .max ().item ()
655- maybe_padded_num_tokens = self .select_torchair_padded_batch_size (
656- max_num_token )
657- num_tokens_across_dp = torch .full ((self .dp_size , ),
658- maybe_padded_num_tokens ,
659- dtype = torch .int32 ,
660- device = "cpu" )
661-
662- return maybe_padded_num_tokens , num_tokens_across_dp , with_prefill , enable_dbo
647+ return num_tokens , num_tokens_across_dp , with_prefill , enable_dbo
663648
664649 def _check_dbo_is_valid (self , query_lens : torch .Tensor ,
665650 attn_state : AscendAttentionState ,
0 commit comments