reference_moe_sorting.hpp File Reference

reference_moe_sorting.hpp File Reference#

Composable Kernel: reference_moe_sorting.hpp File Reference
reference_moe_sorting.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  ck_tile

Macros

#define MOE_SORTING_MOCK_ID(token_id_, topk_id_)

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, const HostTensor< IndexType > &local_expert_mask, 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, const index_t tokens, bool local_expert_masking, bool skip_experts_with_zero_token=true)

Macro Definition Documentation

◆ MOE_SORTING_MOCK_ID

#define MOE_SORTING_MOCK_ID ( token_id_,
topk_id_ )
Value:
static_cast<uint32_t>(((token_id_) & 0x00ffffff) | (((topk_id_) & 0xff) << 24))
unsigned int uint32_t
Definition stdint.h:126