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

#include <topksoftmax_infinilm.h>

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

Public Member Functions

 TopksoftmaxInfinilm (const Tensor input, const int64_t topk, const bool norm, Tensor values, Tensor indices)
 
virtual void operator() (const Tensor input, const int64_t topk, const bool norm, Tensor values, Tensor indices) const =0
 
- Public Member Functions inherited from infini::ops::Operator< TopksoftmaxInfinilm >
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 Attributes

Tensor::Shape input_shape_
 
Tensor::Strides input_strides_
 
DataType input_type_
 
Tensor::Shape values_shape_
 
Tensor::Strides values_strides_
 
DataType values_type_
 
Tensor::Shape indices_shape_
 
Tensor::Strides indices_strides_
 
DataType indices_type_
 
int64_t topk_ {0}
 
bool norm_ {false}
 
Tensor::Size row_count_ {0}
 
Tensor::Size width_ {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< TopksoftmaxInfinilm >
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< TopksoftmaxInfinilm >
static constexpr Device::Type device_type_
 
static constexpr std::size_t implementation_index_
 

Detailed Description

Deprecated:
Use TopkSoftmax. This interface will be removed in a future release.

Constructor & Destructor Documentation

◆ TopksoftmaxInfinilm()

infini::ops::TopksoftmaxInfinilm::TopksoftmaxInfinilm ( const Tensor  input,
const int64_t  topk,
const bool  norm,
Tensor  values,
Tensor  indices 
)
inline

Member Function Documentation

◆ operator()()

virtual void infini::ops::TopksoftmaxInfinilm::operator() ( const Tensor  input,
const int64_t  topk,
const bool  norm,
Tensor  values,
Tensor  indices 
) const
pure virtual

Member Data Documentation

◆ device_index_

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

◆ indices_shape_

Tensor::Shape infini::ops::TopksoftmaxInfinilm::indices_shape_
protected

◆ indices_strides_

Tensor::Strides infini::ops::TopksoftmaxInfinilm::indices_strides_
protected

◆ indices_type_

DataType infini::ops::TopksoftmaxInfinilm::indices_type_
protected

◆ input_shape_

Tensor::Shape infini::ops::TopksoftmaxInfinilm::input_shape_
protected

◆ input_strides_

Tensor::Strides infini::ops::TopksoftmaxInfinilm::input_strides_
protected

◆ input_type_

DataType infini::ops::TopksoftmaxInfinilm::input_type_
protected

◆ norm_

bool infini::ops::TopksoftmaxInfinilm::norm_ {false}
protected

◆ row_count_

Tensor::Size infini::ops::TopksoftmaxInfinilm::row_count_ {0}
protected

◆ topk_

int64_t infini::ops::TopksoftmaxInfinilm::topk_ {0}
protected

◆ values_shape_

Tensor::Shape infini::ops::TopksoftmaxInfinilm::values_shape_
protected

◆ values_strides_

Tensor::Strides infini::ops::TopksoftmaxInfinilm::values_strides_
protected

◆ values_type_

DataType infini::ops::TopksoftmaxInfinilm::values_type_
protected

◆ width_

Tensor::Size infini::ops::TopksoftmaxInfinilm::width_ {0}
protected

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