char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Zijun Yuggml : add OpenVINO backend (#15307)9789c4ecd

char/aliceai-t5-moe
751 B27 linesraw
1#include "frontend.h"
2
3#include "input_model.h"
4#include "op_table.h"
5#include "translate_session.h"
6
7namespace ov {
8namespace frontend {
9namespace ggml {
10
11FrontEnd::FrontEnd() {}
12
13std::shared_ptr<Model> FrontEnd::convert(const InputModel::Ptr & model, bool naive) {
14    auto ggml_model = std::dynamic_pointer_cast<ggml::InputModel>(model);
15    FRONT_END_GENERAL_CHECK(ggml_model, "Invalid input model");
16    std::shared_ptr<Model> converted_model;
17    const auto & supported_ops = get_supported_ops();
18    {
19        TranslateSession translate_session(model, supported_ops, naive);
20        converted_model = translate_session.get_converted_model();
21    }
22    return converted_model;
23}
24
25}  // namespace ggml
26}  // namespace frontend
27}  // namespace ov