diff --git a/aten/src/ATen/core/CachingHostAllocator.h b/aten/src/ATen/core/CachingHostAllocator.h index ce3f4429778..603e7e73bc1 100644 --- a/aten/src/ATen/core/CachingHostAllocator.h +++ b/aten/src/ATen/core/CachingHostAllocator.h @@ -677,8 +677,8 @@ struct CachingHostAllocatorImpl { // size. This allows us to quickly find a free block of the right size. // We use deque to store per size free list and guard the list with its own // mutex. - alignas(hardware_destructive_interference_size) std::vector> free_list_ = - std::vector>(MAX_SIZE_INDEX); + alignas(hardware_destructive_interference_size) std::vector> + free_list_{MAX_SIZE_INDEX}; alignas(hardware_destructive_interference_size) std::mutex events_mutex_; std::deque> events_; // event queue paired with block diff --git a/cmake/public/utils.cmake b/cmake/public/utils.cmake index bccd09690e2..efc39f2bc14 100644 --- a/cmake/public/utils.cmake +++ b/cmake/public/utils.cmake @@ -383,7 +383,7 @@ function(torch_compile_options libname) -Wno-strict-aliasing ) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - list(APPEND private_compile_options -Wredundant-move) + list(APPEND private_compile_options -Wredundant-move -Wno-interference-size) endif() if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") list(APPEND private_compile_options -Wextra-semi -Wmove)