#include "third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test_utils.h"
#include <numeric>
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_tester.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_context.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_operand_descriptor.h"
#include "third_party/blink/renderer/modules/ml/ml.h"
#include "third_party/blink/renderer/modules/ml/ml_context.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 {
MLOperand* BuildInput(MLGraphBuilder* builder,
const String& name,
const Vector<uint32_t>& dimensions,
V8MLOperandDataType::Enum data_type,
ExceptionState& exception_state) { … }
NotShared<DOMArrayBufferView> CreateDOMArrayBufferView(
size_t size,
V8MLOperandDataType::Enum data_type) { … }
MLOperand* BuildConstant(
MLGraphBuilder* builder,
const Vector<uint32_t>& dimensions,
V8MLOperandDataType::Enum data_type,
ExceptionState& exception_state,
std::optional<NotShared<DOMArrayBufferView>> user_buffer_view) { … }
}