Spaces:
Running
Running
minor : clean-up some warnings and style (llama/5094)
Browse files* minor : clean-up some warnings and style
ggml-ci
* ggml : add comment
ggml.c
CHANGED
|
@@ -5368,14 +5368,12 @@ struct ggml_tensor * ggml_conv_depthwise_2d(
|
|
| 5368 |
struct ggml_context * ctx,
|
| 5369 |
struct ggml_tensor * a,
|
| 5370 |
struct ggml_tensor * b,
|
| 5371 |
-
struct ggml_tensor * c,
|
| 5372 |
int s0,
|
| 5373 |
int s1,
|
| 5374 |
int p0,
|
| 5375 |
int p1,
|
| 5376 |
int d0,
|
| 5377 |
int d1) {
|
| 5378 |
-
|
| 5379 |
struct ggml_tensor * new_a = ggml_reshape_4d(ctx, a, a->ne[0], a->ne[1], 1, a->ne[2] * a->ne[3]);
|
| 5380 |
struct ggml_tensor * im2col = ggml_im2col(ctx, new_a,
|
| 5381 |
ggml_reshape_4d(ctx, b, b->ne[0], b->ne[1], 1, b->ne[2] * b->ne[3]),
|
|
@@ -9996,7 +9994,7 @@ static void ggml_compute_forward_mul_mat(
|
|
| 9996 |
return;
|
| 9997 |
}
|
| 9998 |
|
| 9999 |
-
const int64_t tgemm0 = ggml_perf_time_us();
|
| 10000 |
for (int64_t i13 = 0; i13 < ne13; i13++) {
|
| 10001 |
for (int64_t i12 = 0; i12 < ne12; i12++) {
|
| 10002 |
const int64_t i03 = i13/r3;
|
|
@@ -16939,7 +16937,10 @@ struct ggml_cplan ggml_graph_plan(const struct ggml_cgraph * cgraph, int n_threa
|
|
| 16939 |
if (ggml_compute_forward_mul_mat_use_blas(node)) {
|
| 16940 |
if (node->src[0]->type != GGML_TYPE_F32) {
|
| 16941 |
// here we need memory for fully dequantized matrix from src0
|
| 16942 |
-
|
|
|
|
|
|
|
|
|
|
| 16943 |
}
|
| 16944 |
} else
|
| 16945 |
#endif
|
|
|
|
| 5368 |
struct ggml_context * ctx,
|
| 5369 |
struct ggml_tensor * a,
|
| 5370 |
struct ggml_tensor * b,
|
|
|
|
| 5371 |
int s0,
|
| 5372 |
int s1,
|
| 5373 |
int p0,
|
| 5374 |
int p1,
|
| 5375 |
int d0,
|
| 5376 |
int d1) {
|
|
|
|
| 5377 |
struct ggml_tensor * new_a = ggml_reshape_4d(ctx, a, a->ne[0], a->ne[1], 1, a->ne[2] * a->ne[3]);
|
| 5378 |
struct ggml_tensor * im2col = ggml_im2col(ctx, new_a,
|
| 5379 |
ggml_reshape_4d(ctx, b, b->ne[0], b->ne[1], 1, b->ne[2] * b->ne[3]),
|
|
|
|
| 9994 |
return;
|
| 9995 |
}
|
| 9996 |
|
| 9997 |
+
//const int64_t tgemm0 = ggml_perf_time_us();
|
| 9998 |
for (int64_t i13 = 0; i13 < ne13; i13++) {
|
| 9999 |
for (int64_t i12 = 0; i12 < ne12; i12++) {
|
| 10000 |
const int64_t i03 = i13/r3;
|
|
|
|
| 16937 |
if (ggml_compute_forward_mul_mat_use_blas(node)) {
|
| 16938 |
if (node->src[0]->type != GGML_TYPE_F32) {
|
| 16939 |
// here we need memory for fully dequantized matrix from src0
|
| 16940 |
+
// take into account that src0 can be broadcasted into src1[2,3]
|
| 16941 |
+
cur = ggml_type_size(GGML_TYPE_F32)
|
| 16942 |
+
* node->src[0]->ne[0]*node->src[0]->ne[1]
|
| 16943 |
+
* node->src[1]->ne[2]*node->src[1]->ne[3];
|
| 16944 |
}
|
| 16945 |
} else
|
| 16946 |
#endif
|
ggml.h
CHANGED
|
@@ -1499,7 +1499,6 @@ extern "C" {
|
|
| 1499 |
struct ggml_context * ctx,
|
| 1500 |
struct ggml_tensor * a,
|
| 1501 |
struct ggml_tensor * b,
|
| 1502 |
-
struct ggml_tensor * c,
|
| 1503 |
int s0,
|
| 1504 |
int s1,
|
| 1505 |
int p0,
|
|
|
|
| 1499 |
struct ggml_context * ctx,
|
| 1500 |
struct ggml_tensor * a,
|
| 1501 |
struct ggml_tensor * b,
|
|
|
|
| 1502 |
int s0,
|
| 1503 |
int s1,
|
| 1504 |
int p0,
|