include/ck_tile/host/reference/reference_moe_sorting.hpp File Reference

include/ck_tile/host/reference/reference_moe_sorting.hpp File Reference#

Composable Kernel: include/ck_tile/host/reference/reference_moe_sorting.hpp File Reference
reference_moe_sorting.hpp File Reference

Go to the source code of this file.

Namespaces

 ck_tile
 

Macros

#define MOE_SORTING_MOCK_ID(token_id_, topk_id_)    static_cast<uint32_t>(((token_id_)&0x00ffffff) | (((topk_id_)&0xff) << 24))
 

Functions

template<typename WeightType , typename IndexType = index_t>
CK_TILE_HOST void ck_tile::reference_moe_sorting (const HostTensor< IndexType > &topk_ids, const HostTensor< WeightType > &weights, HostTensor< IndexType > &p_sorted_token_ids, HostTensor< WeightType > &sorted_weight, HostTensor< IndexType > &sorted_expert_ids, index_t &unit_cnt, const index_t experts, const index_t unit_size)
 

Macro Definition Documentation

◆ MOE_SORTING_MOCK_ID

#define MOE_SORTING_MOCK_ID (   token_id_,
  topk_id_ 
)     static_cast<uint32_t>(((token_id_)&0x00ffffff) | (((topk_id_)&0xff) << 24))