include_tensor_kernels.h#
-
namespace ONNX_LIGHT_NAMESPACE
-
namespace onnx_backend_test
-
namespace kernel
-
class Cast#
- #include <include_tensor_kernels.h>
Performs element-wise type conversion of an input tensor
xto the data type specified byto(aTensorProto::DataTypevalue, mirroring theCastoperator’s requiredtoattribute). The output shape always matches the input shape.The reference implementation supports the four most widely used numeric element types in the backend test library:
FLOAT,DOUBLE,INT32andINT64(and a no-op whentoequals the input dtype). Other dtypes will cause the kernel to throwstd::invalid_argument: this is sufficient for the backend test cases registered today and keeps the implementation small. Out-of-range floating-point values when casting to an integer dtype follow C++static_castsemantics, which matches the behaviour exercised by the upstreamtest_cast_FLOAT_to_*node tests for the supported conversions.Public Functions
-
inline explicit Cast(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
Output element type may differ from the input element type, so storage can not be shared in general.
Private Members
-
KernelContext ctx_#
-
inline explicit Cast(const KernelContext &ctx)#
-
class Concat#
- #include <include_tensor_kernels.h>
Concatenates a list of tensors along
axis(since opset 13). All input tensors must share the same data type and the same shape except along the concatenation axis.axismay be negative, in which case it counts from the back of the input rank.Public Functions
-
inline explicit Concat(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
Private Members
-
KernelContext ctx_#
-
inline explicit Concat(const KernelContext &ctx)#
-
class Cast#
-
namespace kernel
-
namespace onnx_backend_test