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
2 changes: 1 addition & 1 deletion csrc/cpu_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void dequantizeBlockwise4bitCpu(
long long absmax_dim_1 = dim_1 / blocksize;
using Tcomp = float;
constexpr auto VEC_LEN = sizeof(__m512i) / sizeof(Tcomp); // 16
if (dim_1 % VEC_LEN == 0 && blocksize >= VEC_LEN) {
if (dim_1 % VEC_LEN == 0 && blocksize >= VEC_LEN && dim_1 % blocksize == 0) {
__m512 lut = DATA_TYPE == 1 ? set_fp4_lut() : set_nf4_lut();
constexpr auto k_step = VEC_LEN / 2; // 8
BNB_OMP_PARALLEL_FOR
Expand Down