Skip to content

Commit

Permalink
ja: fix a bug that needed cast may not be done
Browse files Browse the repository at this point in the history
If the cast source is a no weight reference vector and the cast target
ja uses float32 weight, it should be casted. But it's not done.
  • Loading branch information
kou committed Dec 17, 2024
1 parent 454ab05 commit f2db1e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/store.c
Original file line number Diff line number Diff line change
Expand Up @@ -5901,9 +5901,9 @@ grn_ja_cast_value_vector_fixed_uvector(grn_ctx *ctx,
need_convert = true;
}
if (is_weight_float32) {
need_convert = value_is_weight_bfloat16;
need_convert = need_convert || value_is_weight_bfloat16;
} else if (is_weight_bfloat16) {
need_convert = !value_is_weight_bfloat16;
need_convert = need_convert || !value_is_weight_bfloat16;
} else {
need_convert = true;
}
Expand Down

0 comments on commit f2db1e3

Please sign in to comment.