chromium/third_party/blink/renderer/modules/ml/webnn/ml_operator.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/modules/ml/webnn/ml_operator.h"

#include "services/webnn/public/mojom/webnn_graph.mojom-blink.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_arg_min_max_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_gru_cell_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_gru_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_lstm_cell_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_lstm_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_pad_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_split_options.h"
#include "third_party/blink/renderer/modules/ml/webnn/ml_graph_builder.h"
#include "third_party/blink/renderer/modules/ml/webnn/ml_operand.h"

namespace blink {

// static
String MLOperator::OperatorKindToString(
    webnn::mojom::blink::Operation::Tag kind,
    OperationSubKind sub_kind) {}

MLOperator::MLOperator(MLGraphBuilder* builder,
                       webnn::mojom::blink::Operation::Tag kind,
                       const MLOperatorOptions* options,
                       OperationSubKind sub_kind)
    :{}

MLOperator::~MLOperator() = default;

void MLOperator::Trace(Visitor* visitor) const {}

webnn::mojom::blink::Operation::Tag MLOperator::Kind() const {}

MLOperator::OperationSubKind MLOperator::SubKind() const {}

const MLOperatorOptions* MLOperator::Options() const {}

const HeapVector<Member<const MLOperand>>& MLOperator::Inputs() const {}

const HeapVector<Member<const MLOperand>>& MLOperator::Outputs() const {}

void MLOperator::Connect(HeapVector<Member<const MLOperand>> inputs,
                         HeapVector<Member<const MLOperand>> outputs) {}

MLArgMinMaxOperator::MLArgMinMaxOperator(MLGraphBuilder* builder,
                                         OperationSubKind sub_kind,
                                         const uint32_t axis,
                                         const MLArgMinMaxOptions* options)
    :{}

MLArgMinMaxOperator::~MLArgMinMaxOperator() = default;

MLConcatOperator::MLConcatOperator(MLGraphBuilder* builder,
                                   const uint32_t axis,
                                   const MLOperatorOptions* options)
    :{}

MLConcatOperator::~MLConcatOperator() = default;

uint32_t MLConcatOperator::Axis() const {}

MLLstmOperator::MLLstmOperator(MLGraphBuilder* builder,
                               uint32_t steps,
                               uint32_t hidden_size,
                               const MLLstmOptions* options)
    :{}

MLLstmOperator::~MLLstmOperator() = default;

uint32_t MLLstmOperator::steps() const {}

uint32_t MLLstmOperator::hidden_size() const {}

MLLstmCellOperator::MLLstmCellOperator(MLGraphBuilder* builder,
                                       uint32_t hidden_size,
                                       const MLLstmCellOptions* options)
    :{}

MLLstmCellOperator::~MLLstmCellOperator() = default;

uint32_t MLLstmCellOperator::hidden_size() const {}

MLGruOperator::MLGruOperator(MLGraphBuilder* builder,
                             uint32_t steps,
                             uint32_t hidden_size,
                             const MLOperatorOptions* options)
    :{}

MLGruOperator::~MLGruOperator() = default;

MLGruCellOperator::MLGruCellOperator(MLGraphBuilder* builder,
                                     uint32_t hidden_size,
                                     const MLGruCellOptions* options)
    :{}

MLGruCellOperator::~MLGruCellOperator() = default;

MLPadOperator::MLPadOperator(MLGraphBuilder* builder,
                             const Vector<uint32_t>& beginning_padding,
                             const Vector<uint32_t>& ending_padding,
                             const MLPadOptions* options)
    :{}

MLPadOperator::~MLPadOperator() = default;

const Vector<uint32_t>& MLPadOperator::BeginningPadding() const {}

const Vector<uint32_t>& MLPadOperator::EndingPadding() const {}

MLSliceOperator::MLSliceOperator(MLGraphBuilder* builder,
                                 const Vector<uint32_t>& starts,
                                 const Vector<uint32_t>& sizes,
                                 const MLOperatorOptions* options)
    :{}

MLSliceOperator::~MLSliceOperator() = default;

const Vector<uint32_t>& MLSliceOperator::Starts() const {}

const Vector<uint32_t>& MLSliceOperator::Sizes() const {}

MLSoftmaxOperator::MLSoftmaxOperator(MLGraphBuilder* builder,
                                     const uint32_t axis,
                                     const MLOperatorOptions* options)
    :{}

MLSoftmaxOperator::~MLSoftmaxOperator() = default;

MLSplitOperator::MLSplitOperator(MLGraphBuilder* builder,
                                 const uint32_t splits,
                                 const MLSplitOptions* options)
    :{}

MLSplitOperator::MLSplitOperator(MLGraphBuilder* builder,
                                 const Vector<uint32_t>& splits,
                                 const MLSplitOptions* options)
    :{}

MLSplitOperator::~MLSplitOperator() = default;

bool MLSplitOperator::IsEvenSplit() const {}

uint32_t MLSplitOperator::SplitNumber() const {}

const Vector<uint32_t>& MLSplitOperator::SplitSizes() const {}
}  // namespace blink