From 11c15afa1f9cd2c9c78dc6ecaeb0b0bb554fef69 Mon Sep 17 00:00:00 2001 From: Ramil Bakhshyiev Date: Fri, 9 Aug 2024 02:04:53 -0700 Subject: [PATCH] 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 --- faiss/python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faiss/python/CMakeLists.txt b/faiss/python/CMakeLists.txt index 5a01a759e7..c7b22d19c8 100644 --- a/faiss/python/CMakeLists.txt +++ b/faiss/python/CMakeLists.txt @@ -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()