Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cuda implementation for ggml_conv_transpose_1d #854

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fixed accumulator bug
  • Loading branch information
balisujohn committed Jun 15, 2024
commit 2e7445e3a8437784b409dcd00375cc3cd2505573
6 changes: 3 additions & 3 deletions src/ggml-cuda/conv-transpose-1d.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static __global__ void conv_transpose_1d_kernel(

int out_index = global_index / dst_ne0;

int accumulator = 0;
float accumulator = 0;

for (int c = 0; c < src0_ne2; c++)
{
Expand All @@ -34,8 +34,8 @@ static __global__ void conv_transpose_1d_kernel(
int weight_idx = idx - i*s0;


int kernel_weight = src0[kernel_offset + weight_idx];
int input_value = src1[input_offset+i];
float kernel_weight = src0[kernel_offset + weight_idx];
float input_value = src1[input_offset+i];

accumulator += kernel_weight * input_value;
}
Expand Down