Skip to content

Commit 3d4977c

Browse files
ikawrakowIwan Kawrakow
andauthored
Fix gemma3 vision (ikawrakow#803)
* Remove unnecessary assert in im2col * Remove unnecessary assert in im2col (CPU) --------- Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent 95780cd commit 3d4977c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ggml/src/ggml-cuda/im2col.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void ggml_cuda_op_im2col(ggml_backend_cuda_context & ctx, ggml_tensor * dst) {
6969
float * dst_d = (float *)dst->data;
7070
cudaStream_t stream = ctx.stream();
7171

72-
GGML_ASSERT(src0->type == GGML_TYPE_F16);
72+
//GGML_ASSERT(src0->type == GGML_TYPE_F16);
7373
GGML_ASSERT(src1->type == GGML_TYPE_F32);
7474
GGML_ASSERT( dst->type == GGML_TYPE_F16 || dst->type == GGML_TYPE_F32);
7575

ggml/src/ggml.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18805,7 +18805,6 @@ static void ggml_compute_forward_im2col_f16(
1880518805
const struct ggml_tensor * src0 = dst->src[0];
1880618806
const struct ggml_tensor * src1 = dst->src[1];
1880718807

18808-
GGML_ASSERT(src0->type == GGML_TYPE_F16);
1880918808
GGML_ASSERT(src1->type == GGML_TYPE_F32);
1881018809
GGML_ASSERT( dst->type == GGML_TYPE_F16);
1881118810

@@ -18836,7 +18835,6 @@ static void ggml_compute_forward_im2col_f16(
1883618835
int ofs0 = is_2D ? nb13 : nb12;
1883718836
int ofs1 = is_2D ? nb12 : nb11;
1883818837

18839-
GGML_ASSERT(nb00 == sizeof(ggml_fp16_t));
1884018838
GGML_ASSERT(nb10 == sizeof(float));
1884118839

1884218840
// im2col: [N, IC, IH, IW] => [N, OH, OW, IC*KH*KW]

0 commit comments

Comments
 (0)