webnn: Format mojom files
I needed an excuse to try out the new formatter added in https://crrev.com/c/5254504 :) Change-Id: Id4697bdbd9905133c7b4f62ec4ebe194fc37a745 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5262382 Reviewed-by: Alex Gough <ajgo@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Commit-Queue: Alex Gough <ajgo@chromium.org> Auto-Submit: Austin Sullivan <asully@chromium.org> Cr-Commit-Position: refs/heads/main@{#1255756}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
0559ef8ddc
commit
a9034b7331
@ -22,7 +22,11 @@ struct Operand {
|
||||
kUint8,
|
||||
};
|
||||
|
||||
enum Kind { kInput, kConstant, kOutput };
|
||||
enum Kind {
|
||||
kInput,
|
||||
kConstant,
|
||||
kOutput,
|
||||
};
|
||||
|
||||
Kind kind;
|
||||
// The data type of the operand.
|
||||
@ -131,7 +135,10 @@ struct Concat {
|
||||
// width), `kChannelsLast` means `nhwc` (batches, height, width, channels).
|
||||
// The type is used to get the spatial dimension from input tensor, thus safe to
|
||||
// represent as enum.
|
||||
enum InputOperandLayout { kChannelsFirst, kChannelsLast };
|
||||
enum InputOperandLayout {
|
||||
kChannelsFirst,
|
||||
kChannelsLast,
|
||||
};
|
||||
|
||||
// A size has height and width values.
|
||||
struct Size2d {
|
||||
@ -202,7 +209,7 @@ struct Conv2d {
|
||||
// The shapes of left-hand side (lhs) operand and right-hand side (rhs) operand
|
||||
// must be compatible according to numpy-broadcasting-rule:
|
||||
// https://www.w3.org/TR/webnn/#biblio-numpy-broadcasting-rule
|
||||
struct ElementWiseBinary {
|
||||
struct ElementWiseBinary {
|
||||
enum Kind {
|
||||
kAdd,
|
||||
kSub,
|
||||
@ -233,7 +240,7 @@ struct ElementWiseBinary {
|
||||
|
||||
// Represents an element-wise unary operation, mathematically equivalent to:
|
||||
// <output_operand> = <operation_kind>(<input_operand>);
|
||||
struct ElementWiseUnary {
|
||||
struct ElementWiseUnary {
|
||||
enum Kind {
|
||||
kAbs,
|
||||
kCeil,
|
||||
@ -278,8 +285,11 @@ struct Expand {
|
||||
struct ConstantPadding {
|
||||
float value = 0;
|
||||
};
|
||||
|
||||
struct EdgePadding {};
|
||||
|
||||
struct ReflectionPadding {};
|
||||
|
||||
struct SymmetricPadding {};
|
||||
|
||||
union PaddingMode {
|
||||
@ -312,7 +322,8 @@ struct InstanceNormalization {
|
||||
InputOperandLayout layout;
|
||||
};
|
||||
|
||||
// Represents matmul operation which compute the matrix product of two input tensors.
|
||||
// Represents matmul operation which compute the matrix product of two input
|
||||
// tensors.
|
||||
struct Matmul {
|
||||
// The id of `a` operand is used to get the `Operand` description from
|
||||
// `GraphInfo.id_to_operand_map`.
|
||||
@ -344,7 +355,7 @@ struct Pad {
|
||||
PaddingMode mode;
|
||||
};
|
||||
|
||||
struct Reduce {
|
||||
struct Reduce {
|
||||
enum Kind {
|
||||
kL1,
|
||||
kL2,
|
||||
|
Reference in New Issue
Block a user