include_controlflow_kernels.h#

namespace ONNX_LIGHT_NAMESPACE
namespace onnx_backend_test
namespace kernel
class If#
#include <include_controlflow_kernels.h>

Selects then_value when the scalar BOOL cond is true, otherwise returns else_value. Both branch values must share the same data type and shape.

Public Functions

inline explicit If(const KernelContext &ctx)#
Tensor operator()(const Tensor &cond, const Tensor &then_value, const Tensor &else_value) const#
void operator()(const Tensor &cond, const Tensor &then_value, const Tensor &else_value, Tensor &output) const#

Public Static Functions

static inline constexpr bool CanRunInPlace() noexcept#

Private Members

KernelContext ctx_#