From: Daya S Khudia Date: Wed, 5 Dec 2018 19:50:57 +0000 (-0800) Subject: Move avx2 specific code in different source files (#28) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~2448 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50936cb06ea2679dccc2b6d456575d7dca4c5bdb;p=platform%2Fupstream%2Fpytorch.git Move avx2 specific code in different source files (#28) Summary: Pull Request resolved: https://github.com/pytorch/FBGEMM/pull/28 Pull Request resolved: https://github.com/pytorch/pytorch/pull/14516 This is the first diff in a series of diffs that will separate out avx2 specific code in separate files. The goal is to compile as little as possible code with avx2 and avx512 compiler flags. Reviewed By: jianyuh Differential Revision: D13248376 fbshipit-source-id: 401c2e9d3cd96c420fd08c3efa011febce96ffbb --- diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 2f72ac0..754023e 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -334,6 +334,7 @@ if(USE_FBGEMM) set(FBGEMM_BUILD_BENCHMARKS OFF CACHE BOOL "") set(FBGEMM_LIBRARY_TYPE "static" CACHE STRING "") add_subdirectory("${FBGEMM_SOURCE_DIR}") + set_property(TARGET fbgemm_generic PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET fbgemm_avx2 PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET fbgemm_avx512 PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET fbgemm PROPERTY POSITION_INDEPENDENT_CODE ON)