mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 03:55:20 +00:00
duplicate shape of source
This commit is contained in:
committed by
Akarshan
parent
5a490f07a2
commit
56c7993171
@ -2622,7 +2622,8 @@ struct ggml_tensor * ggml_reglu(
|
||||
struct ggml_tensor * a) {
|
||||
GGML_ASSERT(ggml_is_contiguous_1(a));
|
||||
|
||||
struct ggml_tensor * result = ggml_new_tensor_2d(ctx, a->type, a->ne[0] / 2, a->ne[1]);
|
||||
int64_t ne[GGML_MAX_DIMS] = { a->ne[0] / 2 }; for (int i = 1; i < GGML_MAX_DIMS; i++) ne[i] = a->ne[i];
|
||||
struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, GGML_MAX_DIMS, ne, NULL, 0);
|
||||
|
||||
ggml_set_op_params_i32(result, 0, (int32_t) GGML_UNARY_OP_REGLU);
|
||||
|
||||
@ -2639,7 +2640,8 @@ struct ggml_tensor * ggml_geglu(
|
||||
struct ggml_tensor * a) {
|
||||
GGML_ASSERT(ggml_is_contiguous_1(a));
|
||||
|
||||
struct ggml_tensor * result = ggml_new_tensor_2d(ctx, a->type, a->ne[0] / 2, a->ne[1]);
|
||||
int64_t ne[GGML_MAX_DIMS] = { a->ne[0] / 2 }; for (int i = 1; i < GGML_MAX_DIMS; i++) ne[i] = a->ne[i];
|
||||
struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, GGML_MAX_DIMS, ne, NULL, 0);
|
||||
|
||||
ggml_set_op_params_i32(result, 0, (int32_t) GGML_UNARY_OP_GEGLU);
|
||||
|
||||
@ -2656,7 +2658,8 @@ struct ggml_tensor * ggml_swiglu(
|
||||
struct ggml_tensor * a) {
|
||||
GGML_ASSERT(ggml_is_contiguous_1(a));
|
||||
|
||||
struct ggml_tensor * result = ggml_new_tensor_2d(ctx, a->type, a->ne[0] / 2, a->ne[1]);
|
||||
int64_t ne[GGML_MAX_DIMS] = { a->ne[0] / 2 }; for (int i = 1; i < GGML_MAX_DIMS; i++) ne[i] = a->ne[i];
|
||||
struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, GGML_MAX_DIMS, ne, NULL, 0);
|
||||
|
||||
ggml_set_op_params_i32(result, 0, (int32_t) GGML_UNARY_OP_SWIGLU);
|
||||
|
||||
|
Reference in New Issue
Block a user