Skip to content

Commit 8a58931

Browse files
committed
Add implicit GEMM convolution operation for 2D tensors in CUDA
1 parent 9961d24 commit 8a58931

File tree

4 files changed

+450
-0
lines changed

4 files changed

+450
-0
lines changed

ggml/include/ggml.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ extern "C" {
512512
GGML_OP_IM2COL,
513513
GGML_OP_IM2COL_BACK,
514514
GGML_OP_CONV_2D,
515+
GGML_OP_CONV_2D_IMPLICIT,
515516
GGML_OP_CONV_3D,
516517
GGML_OP_CONV_2D_DW,
517518
GGML_OP_CONV_TRANSPOSE_2D,
@@ -1941,6 +1942,17 @@ extern "C" {
19411942
int d0, // dilation dimension 0
19421943
int d1); // dilation dimension 1
19431944

1945+
GGML_API struct ggml_tensor * ggml_conv_2d_implicitgemm(
1946+
struct ggml_context * ctx,
1947+
struct ggml_tensor * a, // convolution kernel [KW, KH, IC, OC]
1948+
struct ggml_tensor * b, // input data [W, H, C, N]
1949+
int s0, // stride dimension 0
1950+
int s1, // stride dimension 1
1951+
int p0, // padding dimension 0
1952+
int p1, // padding dimension 1
1953+
int d0, // dilation dimension 0
1954+
int d1); // dilation dimension 1
1955+
19441956
GGML_API struct ggml_tensor * ggml_conv_3d(
19451957
struct ggml_context * ctx,
19461958
struct ggml_tensor * a, // kernel [KW, KH, KD, IC * OC]

0 commit comments

Comments
 (0)