#include "../node_context.h"
#include "../op_table.h"
#include "../utils.h"
#include <openvino/op/broadcast.hpp>
#include <openvino/op/constant.hpp>
#include <openvino/op/shape_of.hpp>
namespace ov {
namespace frontend {
namespace ggml {
namespace op {
OutputVector translate_fill(const NodeContext & context) {
num_inputs_check(context, 1, 1);
if (is_recurrent_cache_reset_case(context)) {
return translate_recurrent_cache_reset(context);
}
float c;
memcpy(&c, context.get_output_op_params(), sizeof(float));
auto target_shape = std::make_shared<ov::op::v3::ShapeOf>(process_view_input_new(context, 0), ov::element::i64);
auto val = ov::op::v0::Constant::create(context.get_output_type(), {}, {c});
auto res = std::make_shared<ov::op::v3::Broadcast>(val, target_shape);
return rename_outputs_with_suffix({res}, context.get_name());
}
} } } }