#ifndef SERVICES_WEBNN_WEBNN_UTILS_H_
#define SERVICES_WEBNN_WEBNN_UTILS_H_
#include <string>
#include "base/component_export.h"
#include "base/containers/span.h"
#include "services/webnn/public/cpp/operand_descriptor.h"
#include "services/webnn/public/mojom/webnn_graph.mojom.h"
namespace webnn {
std::string COMPONENT_EXPORT(WEBNN_UTILS)
OpTagToString(mojom::Operation::Tag tag);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
OpKindToString(mojom::ArgMinMax::Kind kind);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
OpKindToString(mojom::ElementWiseBinary::Kind kind);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
OpKindToString(mojom::ElementWiseUnary::Kind kind);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
OpKindToString(mojom::Reduce::Kind kind);
std::string COMPONENT_EXPORT(WEBNN_UTILS) GetOpName(const mojom::Operation& op);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
NotSupportedOperatorError(const mojom::Operation& op);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
NotSupportedOperatorError(const mojom::ElementWiseUnary& op);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
NotSupportedArgumentTypeError(std::string_view op_name,
std::string_view argument_name,
OperandDataType type);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
NotSupportedInputArgumentTypeError(std::string_view op_name,
OperandDataType type);
std::string COMPONENT_EXPORT(WEBNN_UTILS)
NotSupportedOptionTypeError(std::string_view op_name,
std::string_view option_name,
OperandDataType type);
std::vector<uint32_t> COMPONENT_EXPORT(WEBNN_UTILS)
PermuteArray(base::span<const uint32_t> array,
base::span<const uint32_t> permutation);
bool COMPONENT_EXPORT(WEBNN_UTILS)
IsLogicalElementWiseBinary(mojom::ElementWiseBinary::Kind kind);
}
#endif