Skip to content

Commit cfc3eef

Browse files
dskhudiafacebook-github-bot
authored andcommitted
Move avx2 specific code in different source files (#28)
Summary: Pull Request resolved: pytorch/FBGEMM#28 Pull Request resolved: pytorch/pytorch#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
1 parent e462b36 commit cfc3eef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/Dependencies.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ if(USE_FBGEMM)
334334
set(FBGEMM_BUILD_BENCHMARKS OFF CACHE BOOL "")
335335
set(FBGEMM_LIBRARY_TYPE "static" CACHE STRING "")
336336
add_subdirectory("${FBGEMM_SOURCE_DIR}")
337+
set_property(TARGET fbgemm_generic PROPERTY POSITION_INDEPENDENT_CODE ON)
337338
set_property(TARGET fbgemm_avx2 PROPERTY POSITION_INDEPENDENT_CODE ON)
338339
set_property(TARGET fbgemm_avx512 PROPERTY POSITION_INDEPENDENT_CODE ON)
339340
set_property(TARGET fbgemm PROPERTY POSITION_INDEPENDENT_CODE ON)

0 commit comments

Comments
 (0)