Skip to content

Commit

Permalink
FIx a bug for a non-simdlib code of ResidualQuantizer (#3868)
Browse files Browse the repository at this point in the history
Summary:
This causes an access violation error.

The reason why this was not caught in unit tests for AVX/NEON is that this code branch is unlikely to be used.

The reason why this was not caught in unit tests for a plain non-SIMD binary is unclear.

More ResidualQuantizer patches to follow.

Pull Request resolved: #3868

Reviewed By: mengdilin

Differential Revision: D62882531

Pulled By: mnorris11

fbshipit-source-id: fc50c7409d6064605f783c342b0d313145ffe948
  • Loading branch information
alexanderguzhva authored and facebook-github-bot committed Sep 17, 2024
1 parent fa60ae6 commit 317bd00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions faiss/impl/residual_quantizer_encode_steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void accum_and_store_tab(
for (size_t ij = 1; ij < M; ij++) {
reg += cbs[ij][kk];
}
output[b * K + kk] = reg;
output[kk] = reg;
}
}

Expand Down Expand Up @@ -152,7 +152,7 @@ void accum_and_add_tab(
for (size_t ij = 1; ij < M; ij++) {
reg += cbs[ij][kk];
}
output[b * K + kk] += reg;
output[kk] += reg;
}
}

Expand Down

0 comments on commit 317bd00

Please sign in to comment.