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

#include <smooth_l1_loss.h>

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

Public Member Functions

 SmoothL1Loss (const Tensor input, const Tensor target, const std::optional< bool > size_average, const std::optional< bool > reduce, const std::string reduction, const double beta, Tensor out)
 
 SmoothL1Loss (const Tensor input, const Tensor target, const int64_t reduction, const double beta, Tensor out)
 
void operator() (const Tensor input, const Tensor target, const std::optional< bool > size_average, const std::optional< bool > reduce, const std::string reduction, const double beta, Tensor out) const
 
virtual void operator() (const Tensor input, const Tensor target, const int64_t reduction, const double beta, Tensor out) const =0
 
- Public Member Functions inherited from infini::ops::Operator< SmoothL1Loss >
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 out_shape_
 
Tensor::Strides out_strides_
 
DataType out_type_
 
int64_t reduction_ {}
 
double beta_ {}
 
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< SmoothL1Loss >
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< SmoothL1Loss >
static constexpr Device::Type device_type_
 
static constexpr std::size_t implementation_index_
 

Constructor & Destructor Documentation

◆ SmoothL1Loss() [1/2]

infini::ops::SmoothL1Loss::SmoothL1Loss ( const Tensor  input,
const Tensor  target,
const std::optional< bool >  size_average,
const std::optional< bool >  reduce,
const std::string  reduction,
const double  beta,
Tensor  out 
)
inline

◆ SmoothL1Loss() [2/2]

infini::ops::SmoothL1Loss::SmoothL1Loss ( const Tensor  input,
const Tensor  target,
const int64_t  reduction,
const double  beta,
Tensor  out 
)
inline
Deprecated:
Use the overload with Python-compatible reduction arguments. This constructor will be removed in a future release.

Member Function Documentation

◆ operator()() [1/2]

virtual void infini::ops::SmoothL1Loss::operator() ( const Tensor  input,
const Tensor  target,
const int64_t  reduction,
const double  beta,
Tensor  out 
) const
pure virtual
Deprecated:
Use the overload with Python-compatible reduction arguments. This overload will be removed in a future release.

◆ operator()() [2/2]

void infini::ops::SmoothL1Loss::operator() ( const Tensor  input,
const Tensor  target,
const std::optional< bool >  size_average,
const std::optional< bool >  reduce,
const std::string  reduction,
const double  beta,
Tensor  out 
) const
inline

Member Data Documentation

◆ beta_

double infini::ops::SmoothL1Loss::beta_ {}
protected

◆ device_index_

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

◆ input_shape_

Tensor::Shape infini::ops::SmoothL1Loss::input_shape_
protected

◆ input_strides_

Tensor::Strides infini::ops::SmoothL1Loss::input_strides_
protected

◆ input_type_

DataType infini::ops::SmoothL1Loss::input_type_
protected

◆ out_shape_

Tensor::Shape infini::ops::SmoothL1Loss::out_shape_
protected

◆ out_strides_

Tensor::Strides infini::ops::SmoothL1Loss::out_strides_
protected

◆ out_type_

DataType infini::ops::SmoothL1Loss::out_type_
protected

◆ reduction_

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

◆ target_shape_

Tensor::Shape infini::ops::SmoothL1Loss::target_shape_
protected

◆ target_strides_

Tensor::Strides infini::ops::SmoothL1Loss::target_strides_
protected

◆ target_type_

DataType infini::ops::SmoothL1Loss::target_type_
protected

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