Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ggml/src/ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -4272,14 +4272,13 @@ struct ggml_tensor * ggml_conv_1d_dw(
int s0,
int p0,
int d0) {
struct ggml_tensor * new_a = ggml_reshape_4d(ctx, a, a->ne[0], 1, a->ne[1], a->ne[2]);
struct ggml_tensor * new_b = ggml_reshape_4d(ctx, b, b->ne[0], 1, b->ne[1], b->ne[2]);

struct ggml_tensor * im2col = ggml_im2col(ctx, new_a, new_b, s0, 0, p0, 0, d0, 0, false, GGML_TYPE_F16);
struct ggml_tensor * im2col = ggml_im2col(ctx, a, new_b, s0, 0, p0, 0, d0, 0, false, GGML_TYPE_F16);

struct ggml_tensor * result = ggml_mul_mat(ctx, im2col, a);

result = ggml_reshape_3d(ctx, result, b->ne[0], b->ne[1], 1);
result = ggml_reshape_3d(ctx, result, result->ne[0], result->ne[2], 1);

return result;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/sync-ggml.last
Original file line number Diff line number Diff line change
@@ -1 +1 @@
daf7906728036a82f20c69fcbd74b6f536c74d3f
b141fc226b68e4af383101c39da90b54ede98850
5 changes: 2 additions & 3 deletions tests/test-opt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
#include "ggml-backend.h"
#include "ggml-cpu.h"
#include "ggml-opt.h"
#include "../ggml/src/ggml-impl.h"
#include "../common/common.h"

#include <cmath>
#include <cinttypes>
#include <cstring>
#include <random>
#include <string>
#include <thread>
#include <vector>

#define TEST_LOG(...) GGML_LOG_DEBUG(__VA_ARGS__)
#define TEST_LOG(...) printf(__VA_ARGS__)

static bool almost_equal(const double a, const double b, const double atol) {
return fabs(a - b) < atol;
Expand Down
Loading