include_sequence_kernels.h#

namespace ONNX_LIGHT_NAMESPACE
namespace onnx_backend_test
namespace kernel
class SequenceConstruct#
#include <include_sequence_kernels.h>

Stacks inputs along a new outer axis 0 to materialize the constructed tensor sequence. All inputs must share the same data_type and shape; the output has shape [N, *inputs[0].shape] and contains the concatenation of the per-input byte buffers.

Public Functions

inline explicit SequenceConstruct(const KernelContext &ctx)#
Tensor operator()(const std::vector<Tensor> &inputs) const#
void operator()(const std::vector<Tensor> &inputs, Tensor &output) const#
Sequence AsSequence(const std::vector<Tensor> &inputs) const#

Sequence-returning overload. Builds an :cpp:struct:Sequence whose elem_type is the common element type of inputs (or UNDEFINED when inputs is empty) and whose values preserves the input order. Unlike the Tensor-returning overloads, this overload does not stack the inputs into a single buffer and does not require the inputs to share a common shape.

Public Static Functions

static inline constexpr bool CanRunInPlace() noexcept#

Output layout is a stacked concatenation of input byte buffers, which cannot share storage with any single input buffer.

Private Members

KernelContext ctx_#