include_reduction_kernels.h#

namespace ONNX_LIGHT_NAMESPACE
namespace onnx_backend_test
namespace kernel
class ReduceSum#
#include <include_reduction_kernels.h>

Sum reduction of a FLOAT input data along the dimensions listed in the optional axes int64 tensor. If axes is omitted (or empty), the kernel reduces over all dimensions unless noop_with_empty_axes is true in which case it performs an identity copy.

Public Functions

inline explicit ReduceSum(const KernelContext &ctx)#
Tensor operator()(const Tensor &data, bool keepdims = true, bool noop_with_empty_axes = false) const#

axes omitted: reduces over all dimensions of data (the default when noop_with_empty_axes is false) or returns a copy of data when noop_with_empty_axes is true.

void operator()(const Tensor &data, bool keepdims, bool noop_with_empty_axes, Tensor &output) const#
Tensor operator()(const Tensor &data, const Tensor &axes, bool keepdims = true, bool noop_with_empty_axes = false) const#

Explicit axes: an int64 tensor whose elements are the dimensions to reduce. Negative axis values are accepted (ONNX semantics: axis in [-rank(data), rank(data) - 1]).

void operator()(const Tensor &data, const Tensor &axes, bool keepdims, bool noop_with_empty_axes, Tensor &output) const#

Public Static Functions

static inline constexpr bool CanRunInPlace() noexcept#

Output shape generally differs from the input shape, so the output buffer cannot in general alias the input buffer.

Private Members

KernelContext ctx_#