Skip to content

Commit 241aa80

Browse files
OpenVINO Backend: remove unused func process_view_input
1 parent 0a94786 commit 241aa80

3 files changed

Lines changed: 2 additions & 25 deletions

File tree

ggml/src/ggml-openvino/openvino/op/mulmat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ OutputVector translate_mulmat(const NodeContext & context) {
3333
ov::Output<ov::Node> B;
3434
ov::Output<ov::Node> A;
3535
if (op_case == 3) {
36-
B = process_view_input(context, 0);
37-
A = process_view_input(context, 1);
36+
B = process_view_input_new(context, 0);
37+
A = process_view_input_new(context, 1);
3838
} else {
3939
B = process_view_input_new(context, 0);
4040
A = process_view_input_new(context, 1);

ggml/src/ggml-openvino/openvino/utils.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -234,27 +234,6 @@ std::pair<ov::Output<Node>, ov::Output<Node>> make_sin_cos(int32_t * rope_params
234234
return std::make_pair(sin_theta, cos_theta);
235235
}
236236

237-
ov::Output<ov::Node> process_view_input(const NodeContext & context, int input_index, int slice_len) {
238-
// Only works for VIEW operations that slice at the lowest dimension
239-
// If the VIEW also reshape the result, `slice_len` should be provided
240-
auto input = context.get_input(input_index);
241-
auto * op_params = (size_t *) context.get_input_op_params(input_index);
242-
auto src1_stride = context.get_input_stride(input_index);
243-
244-
int64_t split_addr = op_params[0] / src1_stride[3];
245-
if (slice_len == 0) {
246-
slice_len = context.get_input_shape(input_index)[3].get_length();
247-
}
248-
int64_t slice_end = split_addr + slice_len;
249-
250-
auto begin = ov::op::v0::Constant::create(ov::element::i64, {1}, {split_addr});
251-
auto end = ov::op::v0::Constant::create(ov::element::i64, {1}, {slice_end});
252-
auto stride = ov::op::v0::Constant::create(ov::element::i64, {1}, {1});
253-
auto axes = ov::op::v0::Constant::create(ov::element::i64, {1}, {context.is_stateful() ? 2 : 3});
254-
auto sliced = std::make_shared<ov::op::v8::Slice>(input, begin, end, stride, axes);
255-
return sliced;
256-
}
257-
258237
ov::Output<ov::Node> process_view_input_new(const NodeContext & context, int input_index) {
259238
auto input = context.get_input(input_index);
260239

ggml/src/ggml-openvino/openvino/utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ std::pair<ov::Output<Node>, ov::Output<Node>> make_sin_cos(int32_t * rope_params
6262
bool imrope = false,
6363
bool stateful = false);
6464

65-
ov::Output<ov::Node> process_view_input(const NodeContext & context, int input_index, int slice_len = 0);
66-
6765
ov::Output<ov::Node> process_view_input_new(const NodeContext & context, int input_index);
6866

6967
namespace op {

0 commit comments

Comments
 (0)