diff --git a/ggml/src/ggml-openvino.cpp b/ggml/src/ggml-openvino.cpp index 5ea2351e06..efb8ff12bc 100644 --- a/ggml/src/ggml-openvino.cpp +++ b/ggml/src/ggml-openvino.cpp @@ -1,18 +1,14 @@ #include "ggml-backend-impl.h" -#include "ggml-cpu-impl.h" #include "ggml-impl.h" #include "ggml-openvino.h" #include "ggml-openvino/utils.h" #include "ggml.h" -#include #include -#include #include -#include -#include -#include -#include +#include +#include +#include #define GGML_OPENVINO_MAX_STREAMS 8 @@ -55,10 +51,10 @@ static ggml_backend_buffer_type_t ggml_backend_openvino_get_default_buffer_type( GGML_UNUSED(backend); } -static void ggml_backend_openvino_add_forward(ggml_tensor * dst) { - // Step 1: get the input tensor src0 和 src1 - const struct ggml_tensor *src0 = dst->src[0]; - const struct ggml_tensor *src1 = dst->src[1]; +static enum ggml_status +ggml_backend_openvino_graph_compute(ggml_backend_t backend, struct ggml_cgraph *cgraph) { + int end_node = cgraph->n_nodes - 1; + openvino_frontend_compute(backend, cgraph, 0, end_node); ov::Core core; @@ -1267,17 +1263,6 @@ static ggml_backend_buffer_t ggml_backend_openvino_device_buffer_from_host_ptr(g return nullptr; } -std::set get_openvino_available_opsets() { - ov::Core core; - std::set unique_ops; - for (const auto& opset : ov::get_available_opsets()) { - for (const auto& op : opset.second().get_type_info_set()) { - unique_ops.insert(op.name); - } - } - return unique_ops; -} - static bool ggml_backend_openvino_device_supports_op(ggml_backend_dev_t dev, const ggml_tensor * op) { GGML_ASSERT(dev->reg != nullptr);