[NIXL] Query EP top-k index dtype (#35294)
This commit is contained in:
@@ -32,6 +32,13 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
use_nixl = False
|
use_nixl = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
from nixl_ep import topk_idx_t as NIXL_EP_TOPK_INDICES_DTYPE
|
||||||
|
except ImportError:
|
||||||
|
NIXL_EP_TOPK_INDICES_DTYPE = torch.int64
|
||||||
|
|
||||||
|
assert isinstance(NIXL_EP_TOPK_INDICES_DTYPE, torch.dtype)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
NixlEPDispatchOutput = DeepEPLLDispatchOutput
|
NixlEPDispatchOutput = DeepEPLLDispatchOutput
|
||||||
@@ -288,7 +295,7 @@ class _NixlEPDispatcherImpl(_NixlEPDispatcherImplBase):
|
|||||||
):
|
):
|
||||||
buffer = self._get_buffer()
|
buffer = self._get_buffer()
|
||||||
topk_weights, topk_ids = topk_output.topk_weights, topk_output.topk_ids
|
topk_weights, topk_ids = topk_output.topk_weights, topk_output.topk_ids
|
||||||
topk_ids = topk_ids.to(torch.int64)
|
topk_ids = topk_ids.to(NIXL_EP_TOPK_INDICES_DTYPE)
|
||||||
state = NixlEPBuffer._state()
|
state = NixlEPBuffer._state()
|
||||||
dispatch_ep_size = state.dispatch_ep_size
|
dispatch_ep_size = state.dispatch_ep_size
|
||||||
num_local_experts = state.num_local_experts
|
num_local_experts = state.num_local_experts
|
||||||
|
|||||||
Reference in New Issue
Block a user