#include "services/webnn/webnn_utils.h"
#include <set>
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "services/webnn/public/cpp/webnn_errors.h"
#include "services/webnn/public/mojom/webnn_graph.mojom.h"
namespace webnn {
namespace {
std::string OpKindToString(mojom::Conv2d::Kind kind) { … }
std::string OpKindToString(mojom::Pool2d::Kind kind) { … }
bool ValidateAxes(base::span<const uint32_t> axes) { … }
}
std::string OpTagToString(mojom::Operation::Tag tag) { … }
std::string OpKindToString(mojom::ArgMinMax::Kind kind) { … }
std::string OpKindToString(mojom::ElementWiseBinary::Kind kind) { … }
std::string OpKindToString(mojom::ElementWiseUnary::Kind kind) { … }
std::string OpKindToString(mojom::Reduce::Kind kind) { … }
std::string GetOpName(const mojom::Operation& op) { … }
std::string NotSupportedOperatorError(const mojom::Operation& op) { … }
std::string NotSupportedOperatorError(const mojom::ElementWiseUnary& op) { … }
std::string NotSupportedArgumentTypeError(std::string_view op_name,
std::string_view argument_name,
OperandDataType type) { … }
std::string NotSupportedInputArgumentTypeError(std::string_view op_name,
OperandDataType type) { … }
std::string NotSupportedOptionTypeError(std::string_view op_name,
std::string_view option_name,
OperandDataType type) { … }
std::vector<uint32_t> PermuteArray(base::span<const uint32_t> array,
base::span<const uint32_t> permutation) { … }
bool IsLogicalElementWiseBinary(mojom::ElementWiseBinary::Kind kind) { … }
}