From a364c6d12752b6f0c9cc0d79ed6fe754bab76772 Mon Sep 17 00:00:00 2001 From: ramilbakhshyiev <7597197+ramilbakhshyiev@users.noreply.github.com> Date: Fri, 9 Aug 2024 00:48:47 -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. Differential Revision: D61007640 --- 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()