27 const std::optional<TensorQuantization>& quantization = std::nullopt);
58[[nodiscard]] MAYAFLUX_API std::expected<TensorData, std::string>
convert_tensor(
60 const std::optional<TensorQuantization>& quantization = std::nullopt);
Validated, non-owning view of tensor memory and its layout.
std::string diagnose_conversion(const TensorSpec &source, TensorDType target, const std::optional< TensorQuantization > &quantization)
Empty when a tensor can be converted to a type, otherwise the reason it cannot.
std::expected< TensorData, std::string > convert_tensor(const TensorAccess &source, TensorDType target, const std::optional< TensorQuantization > &quantization)
Convert the elements of a tensor to another element type.
Element type as kind, bit width and lane count.
Complete description of a tensor: type, shape, layout, meaning.