Skip to content

Commit a34a3d3

Browse files
cyyeverfacebook-github-bot
authored andcommitted
Fix uninitialized access (pytorch#4451)
Summary: Pull Request resolved: pytorch#4451 X-link: facebookresearch/FBGEMM#1512 These bugs are real for small values of M, I don't know why the tests passed before, but it is no harm to add initialization with little overhead. Pull Request resolved: pytorch#4448 Reviewed By: cthi Differential Revision: D77828637 Pulled By: q10 fbshipit-source-id: cd730fc6ac2431cbebc8538e6078df6ba8f6c50b
1 parent 7d82ab6 commit a34a3d3

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,6 @@ else(MSVC)
224224
src/FbgemmFP16UKernelsAvx512.cc
225225
src/FbgemmFP16UKernelsAvx512_256.cc
226226
PROPERTIES COMPILE_FLAGS "-masm=intel")
227-
set_source_files_properties(
228-
src/FbgemmI64.cc
229-
src/FbgemmI8Depthwise3DAvx2.cc
230-
src/FbgemmI8DepthwiseAvx2.cc
231-
src/UtilsAvx2.cc
232-
PROPERTIES COMPILE_FLAGS "-Wno-uninitialized")
233227
set_source_files_properties(src/PackMatrix.cc
234228
PROPERTIES COMPILE_FLAGS "-Wno-infinite-recursion")
235229
# Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947

src/TransposeUtilsAvx2.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,9 @@ static void transpose_kernel_mxn_avx2_uint8(
746746
input[i] = _mm256_loadu_si256(reinterpret_cast<__m256i*>(&local_buffer[0]));
747747
}
748748

749-
// for (; i < 8; ++i) {
750-
// input[i] = _mm256_setzero_si256();
751-
//}
749+
for (; i < 8; ++i) {
750+
input[i] = _mm256_setzero_si256();
751+
}
752752

753753
// interleaving 8-bit elements
754754
// e.g., temp[0] now becomes: a0 b0 a1 b1 a2 b2 ...

0 commit comments

Comments
 (0)