Use fbgemm on 2.4
Signed-off-by: Tom Rix <trix@redhat.com>
This commit is contained in:
parent
f3030ddf1d
commit
2d9b5647c3
2 changed files with 73 additions and 5 deletions
47
next/0001-Add-cmake-option-USE_SYSTEM_FBGEMM.patch
Normal file
47
next/0001-Add-cmake-option-USE_SYSTEM_FBGEMM.patch
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
From 091b7fe1ccbb5e4ff4ac6017d42bacb869f61a27 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Rix <trix@redhat.com>
|
||||
Date: Sat, 20 Jul 2024 05:37:15 -0600
|
||||
Subject: [PATCH] Add cmake option USE_SYSTEM_FBGEMM
|
||||
|
||||
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
cmake/Dependencies.cmake | 3 ++-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c4cd4b2c2a98..2068f7c6c4f2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -253,6 +253,7 @@ cmake_dependent_option(USE_STATIC_CUDNN "Use cuDNN static libraries" OFF
|
||||
"USE_CUDNN" OFF)
|
||||
cmake_dependent_option(USE_CUSPARSELT "Use cuSPARSELt" ON "USE_CUDA" OFF)
|
||||
option(USE_FBGEMM "Use FBGEMM (quantized 8-bit server operators)" ON)
|
||||
+option(USE_SYSTEM_FBGEMM "Use system-wide FBGEMM" OFF)
|
||||
option(USE_KINETO "Use Kineto profiling library" ON)
|
||||
option(USE_CUPTI_SO "Use CUPTI as a shared library" ON)
|
||||
option(USE_FAKELOWP "Use FakeLowp operators" OFF)
|
||||
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
||||
index f1f2eb7cec31..192dac46f13b 100644
|
||||
--- a/cmake/Dependencies.cmake
|
||||
+++ b/cmake/Dependencies.cmake
|
||||
@@ -706,6 +706,7 @@ endif()
|
||||
|
||||
# ---[ FBGEMM
|
||||
if(USE_FBGEMM)
|
||||
+ if (NOT USE_SYSTEM_FBGEMM)
|
||||
set(CAFFE2_THIRD_PARTY_ROOT "${PROJECT_SOURCE_DIR}/third_party")
|
||||
if(NOT DEFINED FBGEMM_SOURCE_DIR)
|
||||
set(FBGEMM_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/fbgemm" CACHE STRING "FBGEMM source directory")
|
||||
@@ -746,7 +747,7 @@ if(USE_FBGEMM)
|
||||
target_compile_options_if_supported(asmjit -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
endif()
|
||||
-
|
||||
+ endif()
|
||||
if(USE_FBGEMM)
|
||||
list(APPEND Caffe2_DEPENDENCY_LIBS fbgemm)
|
||||
endif()
|
||||
--
|
||||
2.45.1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue