Skip to content

Commit c5d43a2

Browse files
author
bssrdf
committed
skip if already computed in a preprocess step
1 parent c8700ca commit c5d43a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ggml-cuda/conv-winograd.cu

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,12 @@ static void conv_winograd_stage1_f32_f32_cuda(int tiles_dim_w, int tiles_dim_h,
770770
void ggml_cuda_op_winograd_stage0(ggml_backend_cuda_context & ctx, ggml_tensor * dst) {
771771
const ggml_tensor * src0 = dst->src[0];
772772
// const half * src0_d = (const half *)src0->data;
773-
773+
// in case this tensor has already been computed in a preprocessing step,
774+
// skip this time;
775+
if(src0 == NULL){
776+
return;
777+
}
778+
774779
float * dst_d = (float *)dst->data;
775780
cudaStream_t stream = ctx.stream();
776781
// int id = ggml_cuda_get_device();

0 commit comments

Comments
 (0)