Skip to content

Commit 511775f

Browse files
authored
Upgraded pytorch to 2.3.0 latest version (#123)
* Upgraded pytorch to 2.3.0 latest version * updates to CI * Update macOS download link * Updated macOS runner * Correct the configure step * Updated minimum cmake requirement to be 3.19 * Remove explicit arch for macOS runner * Updated README poster * Updated torchvision version in Dockerfile
1 parent bc8858c commit 511775f

File tree

41 files changed

+61
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+61
-61
lines changed

.github/workflows/build_macos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ on:
1818

1919
jobs:
2020
build-mac:
21-
name: "Macos 11.7 Xcode (Clang)"
22-
runs-on: macos-11
21+
name: "macOS 14.4.1 arm64 Xcode (Clang)"
22+
runs-on: macos-14
2323
strategy:
2424
matrix:
25-
xcode: [11.7, 12.4, 13.2.1]
25+
xcode: [14.3.1, 15.3]
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
- name: Set up CMake
30-
uses: jwlawson/actions-setup-cmake@v1.13
30+
uses: jwlawson/actions-setup-cmake@v2
3131
with:
32-
cmake-version: '3.14.0'
32+
cmake-version: '3.19.0'
3333
- name: Set up Xcode
3434
uses: maxim-lobanov/setup-xcode@v1
3535
with:

.github/workflows/build_ubuntu.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ on:
1818

1919
jobs:
2020
build-ubuntu:
21-
name: "Ubuntu 20.04 GCC"
22-
runs-on: ubuntu-20.04
21+
name: "Ubuntu 22.04 GCC"
22+
runs-on: ubuntu-22.04
2323
strategy:
2424
matrix:
25-
gcc: [9, 10, 11]
25+
gcc: [11, 12, 13]
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
- name: Set up CMake
30-
uses: jwlawson/actions-setup-cmake@v1.13
30+
uses: jwlawson/actions-setup-cmake@v2
3131
with:
32-
cmake-version: '3.14.0'
32+
cmake-version: '3.19.0'
3333
- name: Set up GCC
3434
uses: egor-tensin/setup-gcc@v1
3535
with:

.github/workflows/build_windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- {
2727
name: Windows MSVC 2019,
2828
os: windows-2019,
29-
cmake: '3.14.0'
29+
cmake: '3.19.0'
3030
}
3131
- {
3232
name: Windows MSVC 2022,
@@ -35,9 +35,9 @@ jobs:
3535
}
3636
steps:
3737
- name: Checkout
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939
- name: Set up CMake
40-
uses: jwlawson/actions-setup-cmake@v1.13
40+
uses: jwlawson/actions-setup-cmake@v2
4141
with:
4242
cmake-version: ${{ matrix.config.cmake }}
4343
- name: Cpplint

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(pytorch-cpp VERSION 1.0.0 LANGUAGES CXX)
44

@@ -7,7 +7,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
77
option(DOWNLOAD_DATASETS "Automatically download required datasets at build-time." ON)
88
option(CREATE_SCRIPTMODULES "Automatically create all required scriptmodule files at build-time (requires python3)." OFF)
99

10-
set(PYTORCH_VERSION "2.1.1")
10+
set(PYTORCH_VERSION "2.3.0")
1111
set(PYTORCH_MIN_VERSION "1.12.0")
1212

1313
find_package(Torch QUIET PATHS "${CMAKE_SOURCE_DIR}/libtorch")

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ RUN curl --silent --show-error --location --output ~/miniconda.sh https://repo.a
3131

3232
FROM conda AS conda-installs
3333
# Install pytorch for CPU and torchvision.
34-
ARG PYTORCH_VERSION=2.1.1
35-
ARG TORCHVISION_VERSION=0.16.1
34+
ARG PYTORCH_VERSION=2.3.0
35+
ARG TORCHVISION_VERSION=0.18.0
3636
ENV NO_CUDA=1
3737
RUN conda install pytorch==${PYTORCH_VERSION} torchvision==${TORCHVISION_VERSION} cpuonly -y -c pytorch && conda clean -ya
3838

README.md

Lines changed: 6 additions & 6 deletions

cmake/check_files.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(check_files BASE_DIR FILES_TO_CHECK FILE_MD5S MISSING_FILES)
44
foreach(FILE_TO_CHECK ${${FILES_TO_CHECK}})

cmake/copy_torch_dlls.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(copy_torch_dlls TARGET_NAME)
44
# According to https://github.com/pytorch/pytorch/issues/25457

cmake/cpplint.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
find_program(CPPLINT cpplint)
44

cmake/create_torch_dll_hardlinks.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
file(GLOB TORCH_DLLS "${TORCH_INSTALL_PREFIX}/lib/*.dll")
44

0 commit comments

Comments
 (0)