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

#include <nll_loss2d_forward.h>

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

Public Member Functions

 NllLoss2dForward (const Tensor input, const Tensor target, const std::optional< Tensor > weight, const int64_t reduction, const int64_t ignore_index, Tensor output, Tensor total_weight)
 
virtual void operator() (const Tensor input, const Tensor target, const std::optional< Tensor > weight, const int64_t reduction, const int64_t ignore_index, Tensor output, Tensor total_weight) const =0
 
- Public Member Functions inherited from infini::ops::Operator< NllLoss2dForward >
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 target_shape_
 
Tensor::Strides target_strides_
 
DataType target_type_
 
Tensor::Shape output_shape_
 
Tensor::Strides output_strides_
 
DataType output_type_
 
Tensor::Shape total_weight_shape_
 
Tensor::Strides total_weight_strides_
 
DataType total_weight_type_
 
bool has_weight_ {false}
 
Tensor::Shape weight_shape_
 
Tensor::Strides weight_strides_
 
DataType weight_type_ {DataType::kFloat32}
 
int64_t reduction_ {}
 
int64_t ignore_index_ {}
 
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< NllLoss2dForward >
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< NllLoss2dForward >
static constexpr Device::Type device_type_
 
static constexpr std::size_t implementation_index_
 

Constructor & Destructor Documentation

◆ NllLoss2dForward()

infini::ops::NllLoss2dForward::NllLoss2dForward ( const Tensor  input,
const Tensor  target,
const std::optional< Tensor >  weight,
const int64_t  reduction,
const int64_t  ignore_index,
Tensor  output,
Tensor  total_weight 
)
inline

Member Function Documentation

◆ operator()()

virtual void infini::ops::NllLoss2dForward::operator() ( const Tensor  input,
const Tensor  target,
const std::optional< Tensor >  weight,
const int64_t  reduction,
const int64_t  ignore_index,
Tensor  output,
Tensor  total_weight 
) const
pure virtual

Member Data Documentation

◆ device_index_

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

◆ has_weight_

bool infini::ops::NllLoss2dForward::has_weight_ {false}
protected

◆ ignore_index_

int64_t infini::ops::NllLoss2dForward::ignore_index_ {}
protected

◆ input_shape_

Tensor::Shape infini::ops::NllLoss2dForward::input_shape_
protected

◆ input_strides_

Tensor::Strides infini::ops::NllLoss2dForward::input_strides_
protected

◆ input_type_

DataType infini::ops::NllLoss2dForward::input_type_
protected

◆ output_shape_

Tensor::Shape infini::ops::NllLoss2dForward::output_shape_
protected

◆ output_strides_

Tensor::Strides infini::ops::NllLoss2dForward::output_strides_
protected

◆ output_type_

DataType infini::ops::NllLoss2dForward::output_type_
protected

◆ reduction_

int64_t infini::ops::NllLoss2dForward::reduction_ {}
protected

◆ target_shape_

Tensor::Shape infini::ops::NllLoss2dForward::target_shape_
protected

◆ target_strides_

Tensor::Strides infini::ops::NllLoss2dForward::target_strides_
protected

◆ target_type_

DataType infini::ops::NllLoss2dForward::target_type_
protected

◆ total_weight_shape_

Tensor::Shape infini::ops::NllLoss2dForward::total_weight_shape_
protected

◆ total_weight_strides_

Tensor::Strides infini::ops::NllLoss2dForward::total_weight_strides_
protected

◆ total_weight_type_

DataType infini::ops::NllLoss2dForward::total_weight_type_
protected

◆ weight_shape_

Tensor::Shape infini::ops::NllLoss2dForward::weight_shape_
protected

◆ weight_strides_

Tensor::Strides infini::ops::NllLoss2dForward::weight_strides_
protected

◆ weight_type_

DataType infini::ops::NllLoss2dForward::weight_type_ {DataType::kFloat32}
protected

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