Skip to content

Commit b69401e

Browse files
committed
add comment for batch_size
1 parent b429d0f commit b69401e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tools/mtmd/clip.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,13 +1735,13 @@ struct clip_model_loader {
17351735
}
17361736
if (use_gelu) {
17371737
hparams.ffn_op = FFN_GELU;
1738-
log_ffn_op = "GELU";
1738+
log_ffn_op = "gelu";
17391739
} else if (use_silu) {
17401740
hparams.ffn_op = FFN_SILU;
1741-
log_ffn_op = "SILU";
1741+
log_ffn_op = "silu";
17421742
} else {
17431743
hparams.ffn_op = FFN_GELU_QUICK;
1744-
log_ffn_op = "GELU_QUICK";
1744+
log_ffn_op = "gelu_quick";
17451745
}
17461746
}
17471747

@@ -3102,10 +3102,10 @@ bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_ima
31023102
const clip_image_f32_batch & imgs = *imgs_c_ptr;
31033103
int batch_size = imgs.entries.size();
31043104

3105-
if (ctx->has_llava_projector
3106-
|| ctx->proj_type == PROJECTOR_TYPE_MINICPMV
3107-
|| ctx->proj_type == PROJECTOR_TYPE_GLM_EDGE) {
3108-
GGML_ASSERT(batch_size == 1);
3105+
// TODO @ngxson : implement batch size > 1 as a loop
3106+
// we don't need true batching support because the cgraph will gonna be big anyway
3107+
if (batch_size != 1) {
3108+
return false; // only support batch size of 1
31093109
}
31103110

31113111
// build the inference graph

0 commit comments

Comments
 (0)