From cd827fad4dcee2ef6c241e27d4372a273bc4175d Mon Sep 17 00:00:00 2001 From: Sarbojit Sarkar Date: Tue, 8 Dec 2020 06:58:09 -0500 Subject: [PATCH] SWDEV-262734: Fix for Numa policy bug Change-Id: I4be62c1fc45a59d09aa043af1c998b9e308da604 [ROCm/clr commit: 673f483879ab39786322be823881ff4ae720d834] --- projects/clr/rocclr/CMakeLists.txt | 3 --- projects/clr/rocclr/device/rocm/CMakeLists.txt | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/clr/rocclr/CMakeLists.txt b/projects/clr/rocclr/CMakeLists.txt index 9395558252..81412f3b2d 100644 --- a/projects/clr/rocclr/CMakeLists.txt +++ b/projects/clr/rocclr/CMakeLists.txt @@ -227,11 +227,8 @@ if (UNIX) target_link_libraries(amdrocclr_static PUBLIC ${LIBRT}) endif() - find_library(LIBNUMA numa) if (LIBNUMA) - target_compile_definitions(amdrocclr_static PUBLIC ROCCLR_SUPPORT_NUMA_POLICY) target_link_libraries(amdrocclr_static PUBLIC ${LIBNUMA}) - message(STATUS "Found: ${LIBNUMA}") endif() endif() #comment out as it's not available in cmake 3.5 diff --git a/projects/clr/rocclr/device/rocm/CMakeLists.txt b/projects/clr/rocclr/device/rocm/CMakeLists.txt index 2d56983f59..cb540f1e50 100644 --- a/projects/clr/rocclr/device/rocm/CMakeLists.txt +++ b/projects/clr/rocclr/device/rocm/CMakeLists.txt @@ -47,4 +47,12 @@ if(USE_COMGR_LIBRARY) endif() endif() +if (UNIX) + find_library(LIBNUMA numa) + if (LIBNUMA) + target_compile_definitions(oclrocm PRIVATE ROCCLR_SUPPORT_NUMA_POLICY) + message(STATUS "Found: ${LIBNUMA}") + endif() +endif() + set_target_properties(oclrocm PROPERTIES POSITION_INDEPENDENT_CODE ON)