InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
infini::ops::GetCutlassMoeMmData Class Referenceabstract

#include <get_cutlass_moe_mm_data.h>

Inheritance diagram for infini::ops::GetCutlassMoeMmData:
infini::ops::Operator< GetCutlassMoeMmData > infini::ops::OperatorBase infini::ops::OperatorBase

Public Member Functions

 GetCutlassMoeMmData (const Tensor topk_ids, const int64_t num_experts, const int64_t n, const int64_t k, Tensor expert_offsets, Tensor problem_sizes1, Tensor problem_sizes2, Tensor input_permutation, Tensor output_permutation, std::optional< Tensor > blockscale_offsets=std::nullopt)
 
 GetCutlassMoeMmData (const Tensor topk_ids, const int64_t num_experts, const int64_t n, const int64_t k, const bool is_gated, Tensor expert_offsets, Tensor problem_sizes1, Tensor problem_sizes2, Tensor input_permutation, Tensor output_permutation, std::optional< Tensor > blockscale_offsets=std::nullopt)
 
void operator() (const Tensor topk_ids, const int64_t num_experts, const int64_t n, const int64_t k, Tensor expert_offsets, Tensor problem_sizes1, Tensor problem_sizes2, Tensor input_permutation, Tensor output_permutation, std::optional< Tensor > blockscale_offsets=std::nullopt) const
 
virtual void operator() (const Tensor topk_ids, const int64_t num_experts, const int64_t n, const int64_t k, const bool is_gated, Tensor expert_offsets, Tensor problem_sizes1, Tensor problem_sizes2, Tensor input_permutation, Tensor output_permutation, std::optional< Tensor > blockscale_offsets=std::nullopt) const =0
 
- Public Member Functions inherited from infini::ops::Operator< GetCutlassMoeMmData >
void operator() (const Handle &handle, const Args &... args)
 
void operator() (const Args &... args) const
 
void operator() (const Handle &handle, const Args &... args)
 
void operator() (const Args &... args) const
 
- Public Member Functions inherited from infini::ops::OperatorBase
virtual ~OperatorBase ()=default
 
virtual std::size_t workspace_size_in_bytes () const
 
void set_handle (const Handle &handle)
 
void set_config (const Config &config)
 
void set_stream (void *stream)
 
void set_workspace (void *workspace)
 
void set_workspace_size_in_bytes (std::size_t workspace_size_in_bytes)
 
virtual ~OperatorBase ()=default
 
virtual std::size_t workspace_size_in_bytes () const
 
void set_handle (const Handle &handle)
 
void set_config (const Config &config)
 
void set_stream (void *stream)
 
void set_workspace (void *workspace)
 
void set_workspace_size_in_bytes (std::size_t workspace_size_in_bytes)
 

Protected Member Functions

void ValidateCallMetadata (const Tensor topk_ids, const int64_t num_experts, const int64_t n, const int64_t k, const bool is_gated, const Tensor expert_offsets, const Tensor problem_sizes1, const Tensor problem_sizes2, const Tensor input_permutation, const Tensor output_permutation, const std::optional< Tensor > blockscale_offsets) const
 

Protected Attributes

Tensor topk_ids_metadata_
 
Tensor expert_offsets_metadata_
 
Tensor problem_sizes1_metadata_
 
Tensor problem_sizes2_metadata_
 
Tensor input_permutation_metadata_
 
Tensor output_permutation_metadata_
 
std::optional< Tensor > blockscale_offsets_metadata_
 
int64_t num_experts_ {0}
 
int64_t n_ {0}
 
int64_t k_ {0}
 
bool is_gated_ {true}
 
Tensor::Size numel_ {0}
 
Tensor::Size topk_ {0}
 
int device_index_ {0}
 
- Protected Attributes inherited from infini::ops::OperatorBase
std::unique_ptr< Handle > handle_ptr_
 
std::unique_ptr< Config > config_ptr_
 
void * stream_ {nullptr}
 
void * workspace_ {nullptr}
 
std::size_t workspace_size_in_bytes_ {0}
 

Additional Inherited Members

- Static Public Member Functions inherited from infini::ops::Operator< GetCutlassMoeMmData >
static void clear_cache ()
 
static void clear_cache ()
 
static std::unique_ptr< Operator > Make (const Config &config, const Tensor tensor, Args &&... args)
 
static std::unique_ptr< Operator > Make (const Tensor tensor, Args &&... args)
 
static std::unique_ptr< Operator > Make (const Config &config, const std::vector< Tensor > tensors, Args &&... args)
 
static std::unique_ptr< Operator > Make (const std::vector< Tensor > tensors, Args &&... args)
 
static std::unique_ptr< Operator > Make (const Config &config, const Tensor tensor, Args &&... args)
 
static std::unique_ptr< Operator > Make (const Tensor tensor, Args &&... args)
 
static std::unique_ptr< Operator > Make (const Config &config, const std::vector< Tensor > tensors, Args &&... args)
 
static std::unique_ptr< Operator > Make (const std::vector< Tensor > tensors, Args &&... args)
 
static void Call (const Handle &handle, const Config &config, const Args &... args)
 
static void Call (const Tensor tensor, const Args &... args)
 
static auto Call (const TensorLike &tensor, const Args &... args)
 
static void Call (const Handle &handle, const Config &config, const Args &... args)
 
static void Call (const Tensor tensor, const Args &... args)
 
static auto Call (const TensorLike &tensor, const Args &... args)
 
static std::vector< std::size_t > active_implementation_indices (Device::Type dev_type)
 
static std::vector< std::size_t > active_implementation_indices (Device::Type dev_type)
 
- Static Protected Attributes inherited from infini::ops::Operator< GetCutlassMoeMmData >
static constexpr Device::Type device_type_
 
static constexpr std::size_t implementation_index_
 

Constructor & Destructor Documentation

◆ GetCutlassMoeMmData() [1/2]

infini::ops::GetCutlassMoeMmData::GetCutlassMoeMmData ( const Tensor  topk_ids,
const int64_t  num_experts,
const int64_t  n,
const int64_t  k,
Tensor  expert_offsets,
Tensor  problem_sizes1,
Tensor  problem_sizes2,
Tensor  input_permutation,
Tensor  output_permutation,
std::optional< Tensor >  blockscale_offsets = std::nullopt 
)
inline

◆ GetCutlassMoeMmData() [2/2]

infini::ops::GetCutlassMoeMmData::GetCutlassMoeMmData ( const Tensor  topk_ids,
const int64_t  num_experts,
const int64_t  n,
const int64_t  k,
const bool  is_gated,
Tensor  expert_offsets,
Tensor  problem_sizes1,
Tensor  problem_sizes2,
Tensor  input_permutation,
Tensor  output_permutation,
std::optional< Tensor >  blockscale_offsets = std::nullopt 
)
inline

Member Function Documentation

◆ operator()() [1/2]

virtual void infini::ops::GetCutlassMoeMmData::operator() ( const Tensor  topk_ids,
const int64_t  num_experts,
const int64_t  n,
const int64_t  k,
const bool  is_gated,
Tensor  expert_offsets,
Tensor  problem_sizes1,
Tensor  problem_sizes2,
Tensor  input_permutation,
Tensor  output_permutation,
std::optional< Tensor >  blockscale_offsets = std::nullopt 
) const
pure virtual

◆ operator()() [2/2]

void infini::ops::GetCutlassMoeMmData::operator() ( const Tensor  topk_ids,
const int64_t  num_experts,
const int64_t  n,
const int64_t  k,
Tensor  expert_offsets,
Tensor  problem_sizes1,
Tensor  problem_sizes2,
Tensor  input_permutation,
Tensor  output_permutation,
std::optional< Tensor >  blockscale_offsets = std::nullopt 
) const
inline

◆ ValidateCallMetadata()

void infini::ops::GetCutlassMoeMmData::ValidateCallMetadata ( const Tensor  topk_ids,
const int64_t  num_experts,
const int64_t  n,
const int64_t  k,
const bool  is_gated,
const Tensor  expert_offsets,
const Tensor  problem_sizes1,
const Tensor  problem_sizes2,
const Tensor  input_permutation,
const Tensor  output_permutation,
const std::optional< Tensor >  blockscale_offsets 
) const
inlineprotected

Member Data Documentation

◆ blockscale_offsets_metadata_

std::optional<Tensor> infini::ops::GetCutlassMoeMmData::blockscale_offsets_metadata_
protected

◆ device_index_

int infini::ops::GetCutlassMoeMmData::device_index_ {0}
protected

◆ expert_offsets_metadata_

Tensor infini::ops::GetCutlassMoeMmData::expert_offsets_metadata_
protected

◆ input_permutation_metadata_

Tensor infini::ops::GetCutlassMoeMmData::input_permutation_metadata_
protected

◆ is_gated_

bool infini::ops::GetCutlassMoeMmData::is_gated_ {true}
protected

◆ k_

int64_t infini::ops::GetCutlassMoeMmData::k_ {0}
protected

◆ n_

int64_t infini::ops::GetCutlassMoeMmData::n_ {0}
protected

◆ num_experts_

int64_t infini::ops::GetCutlassMoeMmData::num_experts_ {0}
protected

◆ numel_

Tensor::Size infini::ops::GetCutlassMoeMmData::numel_ {0}
protected

◆ output_permutation_metadata_

Tensor infini::ops::GetCutlassMoeMmData::output_permutation_metadata_
protected

◆ problem_sizes1_metadata_

Tensor infini::ops::GetCutlassMoeMmData::problem_sizes1_metadata_
protected

◆ problem_sizes2_metadata_

Tensor infini::ops::GetCutlassMoeMmData::problem_sizes2_metadata_
protected

◆ topk_

Tensor::Size infini::ops::GetCutlassMoeMmData::topk_ {0}
protected

◆ topk_ids_metadata_

Tensor infini::ops::GetCutlassMoeMmData::topk_ids_metadata_
protected

The documentation for this class was generated from the following file: