Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[riscv] Update pytorch to version 2.4.0 #9293

Merged
merged 10 commits into from
Jul 25, 2024
Prev Previous commit
Next Next commit
Disable ROCm; patch for missing braces is still needed
  • Loading branch information
iarspider committed Jul 11, 2024
commit 8d40948db1585e29e505919d055e5f79d326ee3e
16 changes: 8 additions & 8 deletions pytorch.spec
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@ BuildRequires: cmake ninja
Requires: eigen fxdiv numactl openmpi protobuf psimd python3 py3-PyYAML
Requires: OpenBLAS zlib protobuf fmt py3-pybind11 py3-typing-extensions
%{!?without_cuda:Requires: cuda cudnn}
%{!?without_rocm:Requires: rocm}
#%{!?without_rocm:Requires: rocm rocm-rocrand}

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

%build
@@ -38,6 +38,11 @@ USE_CUDA=%{!?without_cuda:ON}
fi
%endif

#%if 0%{!?without_rocm:1}
#export ROCM_PATH=${ROCM_ROOT}
#export PYTORCH_ROCM_ARCH=gfx900,gfx906,gfx908,gfx90a,gfx1030
#%endif

cmake ../%{n}-%{realversion} \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=%{i} \
@@ -50,9 +55,6 @@ 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 \
@@ -98,6 +100,4 @@ ninja -v %{makeprocesses} install
%{relocateConfig}include/caffe2/core/macros.h
%{relocateConfig}share/cmake/ATen/ATenConfig.cmake

# For ROCm, pre-build
# NOTICE: can't build with both cuda and rocm
# python @{_builddir}/tools/amd_build/build_amd.py
# NOTICE: can't build with both cuda and rocm - see aten/CMakeLists.txt