Skip to content

Commit

Permalink
Update pytorch to version 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Jul 10, 2024
1 parent 3da694c commit 69254bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
12 changes: 6 additions & 6 deletions pytorch-system-fmt.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
diff --git a/c10/CMakeLists.txt b/c10/CMakeLists.txt
index feebad7cbb7..8a2ad840286 100644
--- a/c10/CMakeLists.txt
+++ b/c10/CMakeLists.txt
@@ -87,6 +87,7 @@ endif()
if(${USE_GLOG})
target_link_libraries(c10 PUBLIC glog::glog)
--- a/c10/CMakeLists.txt 2024-07-10 13:31:50.729017827 +0200
+++ b/c10/CMakeLists.txt 2024-07-10 13:32:36.649765887 +0200
@@ -87,6 +87,7 @@
if(C10_USE_GLOG)
target_link_libraries(c10 PUBLIC glog::glog)
endif()
+find_package(fmt REQUIRED)
target_link_libraries(c10 PRIVATE fmt::fmt-header-only)

find_package(Backtrace)
if(C10_USE_NUMA)
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
index 74d0d557190..ff3e94b1c4b 100644
--- a/caffe2/CMakeLists.txt
Expand Down
14 changes: 9 additions & 5 deletions pytorch.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### RPM external pytorch 2.1.1
### RPM external pytorch 2.3.1
## INCLUDE cuda-flags
## INCLUDE microarch_flags

%define cuda_arch_float $(echo %{cuda_arch} | tr ' ' '\\n' | sed -E 's|([0-9])$|.\\1|' | tr '\\n' ' ')
%define tag bb938bbe9f53414dda1e1159795b7536dbffd041
%define tag 63d5e9221bedd1546b7d364b5ce4171547db12a9
%define branch cms/v%{realversion}

Source: git+https://github.com/cms-externals/pytorch.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz
Expand All @@ -16,13 +16,14 @@ Patch2: pytorch-system-fmt

BuildRequires: cmake ninja
Requires: eigen fxdiv numactl openmpi protobuf psimd python3 py3-PyYAML
Requires: OpenBLAS zlib protobuf fmt py3-pybind11
Requires: OpenBLAS zlib protobuf fmt py3-pybind11 py3-typing-extensions
%{!?without_cuda:Requires: cuda cudnn}
%{!?without_rocm:Requires: rocm}

%prep
%setup -n %{n}-%{realversion}
%patch0 -p1
%patch1 -p1
#%patch0 -p1
#%patch1 -p1
%patch2 -p1

%build
Expand All @@ -49,6 +50,9 @@ cmake ../%{n}-%{realversion} \
-DTORCH_CUDA_ARCH_LIST="%{cuda_arch_float}" \
-DCUDNN_INCLUDE_DIR=${CUDNN_ROOT}/include \
-DCUDNN_LIBRARY=${CUDNN_ROOT}/lib64/libcudnn.so \
%endif
%if 0%{!?without_rocm:1}
-DUSE_ROCM=ON \
%endif
-DUSE_NCCL=OFF \
-DUSE_FBGEMM=OFF \
Expand Down

0 comments on commit 69254bb

Please sign in to comment.