Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ int text_image_gather_scatter(
WRAPPER_CHECK_PTR(ctx, int, token_num, token_type_ids);
WRAPPER_CHECK_PTR(ctx, int, token_num, text_index);
WRAPPER_CHECK_PTR(ctx, int, token_num, image_index);
WRAPPER_ASSERT_EQ(ctx, token_num, text_token_num + image_token_num);
// When all tokens are image type, text_token_num will be set to 1 in model.py
WRAPPER_ASSERT_EQ(ctx,
true,
(text_token_num + image_token_num == token_num) ||
(image_token_num == token_num && text_token_num == 1));

if (ctx->dev().type() == api::kCPU) {
return cpu_wrapper<T>(ctx,
Expand Down
Loading