Append ROCm flag to compile definitions for Python instead of overwriting (#3742)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3742

Before this change, the CMake line was setting (instead of appending to) compile definitions for Python code which replace the GPU wrappers flag and resulting in Python library compiling with no GPU code which failed ROCm tests.

Reviewed By: junjieqi

Differential Revision: D61007640

fbshipit-source-id: 174aeb0a4abe0607629ddf57c882d19ea2d6c6bf
pull/3736/head
Ramil Bakhshyiev 2024-08-09 02:04:53 -07:00 committed by Facebook GitHub Bot
parent 13371c7d7e
commit 11c15afa1f
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ macro(configure_swigfaiss source)
COMPILE_DEFINITIONS GPU_WRAPPER
)
if (FAISS_ENABLE_ROCM)
set_source_files_properties(${source} PROPERTIES
set_property(SOURCE ${source} APPEND PROPERTY
COMPILE_DEFINITIONS FAISS_ENABLE_ROCM
)
endif()