Skip to content

Commit

Permalink
Updated minimum cmake requirement to be 3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhuomkar committed May 5, 2024
1 parent 717f066 commit e92e8e1
Show file tree
Hide file tree
Showing 38 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.14.0'
cmake-version: '3.19.0'
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.14.0'
cmake-version: '3.19.0'
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- {
name: Windows MSVC 2019,
os: windows-2019,
cmake: '3.14.0'
cmake: '3.19.0'
}
- {
name: Windows MSVC 2022,
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(pytorch-cpp VERSION 1.0.0 LANGUAGES CXX)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<br />
<img src="https://img.shields.io/github/license/prabhuomkar/pytorch-cpp">
<img src="https://img.shields.io/badge/libtorch-2.3.0-ee4c2c">
<img src="https://img.shields.io/badge/cmake-3.14-064f8d">
<img src="https://img.shields.io/badge/cmake-3.19-064f8d">
</p>


Expand Down Expand Up @@ -51,7 +51,7 @@ This repository provides tutorial code in C++ for deep learning researchers to l
## Requirements

1. [C++-17](http://www.cplusplus.com/doc/tutorial/introduction/) compatible compiler
2. [CMake](https://cmake.org/download/) (minimum version 3.14)
2. [CMake](https://cmake.org/download/) (minimum version 3.19)
3. [LibTorch version >= 1.12.0 and <= 2.3.0](https://pytorch.org/cppdocs/installing.html)
4. [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html)

Expand Down
2 changes: 1 addition & 1 deletion cmake/check_files.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(check_files BASE_DIR FILES_TO_CHECK FILE_MD5S MISSING_FILES)
foreach(FILE_TO_CHECK ${${FILES_TO_CHECK}})
Expand Down
2 changes: 1 addition & 1 deletion cmake/copy_torch_dlls.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(copy_torch_dlls TARGET_NAME)
# According to https://github.com/pytorch/pytorch/issues/25457
Expand Down
2 changes: 1 addition & 1 deletion cmake/cpplint.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

find_program(CPPLINT cpplint)

Expand Down
2 changes: 1 addition & 1 deletion cmake/create_torch_dll_hardlinks.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

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

Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_cifar10.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(fetch_cifar10 DATA_DIR)
set(CIFAR_DIR "${DATA_DIR}/cifar10")
Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_datasets.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

include(${CMAKE_CURRENT_LIST_DIR}/fetch_mnist.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/fetch_cifar10.cmake)
Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_flickr8k.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(fetch_flickr8k DATA_DIR)
set(FLICKR8K_DIR "${DATA_DIR}/flickr_8k")
Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_imagenette.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(fetch_imagenette DATA_DIR)
set(IMAGENETTE_DIR "${DATA_DIR}/imagenette2-160")
Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_libtorch.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

include(FetchContent)

Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_mnist.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(fetch_mnist DATA_DIR)
set(MNIST_DOWNLOAD_DIR "${DATA_DIR}/mnist/download")
Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_neural_style_transfer_images.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(fetch_neural_style_transfer_imagers DATA_DIR)
set(NEURAL_STYLE_TRANSFER_IMAGES_DIR
Expand Down
2 changes: 1 addition & 1 deletion cmake/fetch_penntreebank.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

function(fetch_penntreebank DATA_DIR)
set(PENNTREEBANK_DIR "${DATA_DIR}/penntreebank")
Expand Down
2 changes: 1 addition & 1 deletion cmake/find_gz_extractor.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

# Find program that can extract .gz files.
# Based on: https://github.com/Amber-MD/cmake-buildscripts/blob/master/gzip.cmake
Expand Down
2 changes: 1 addition & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(extern VERSION 1.0.0 LANGUAGES CXX)

Expand Down
6 changes: 3 additions & 3 deletions notebooks/pytorch_cpp_colab_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@
"!rm -rf deps\n",
"!mkdir deps\n",
"%cd /content/deps\n",
"!wget --no-check-certificate https://www.cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.tar.gz\n",
"!tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null\n",
"%mv cmake-3.14.0-Linux-x86_64 cmake-install\n",
"!wget --no-check-certificate https://www.cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz\n",
"!tar -xvf cmake-3.19.0-Linux-x86_64.tar.gz > /dev/null\n",
"%mv cmake-3.19.0-Linux-x86_64 cmake-install\n",
"old_path = %env PATH\n",
"new_path = \"/content/deps/cmake-install:/content/deps/cmake-install/bin:\" + old_path\n",
"%env PATH={new_path}\n",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(generative-adversarial-network VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/advanced/image_captioning/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(image-captioning VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/advanced/neural_style_transfer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(neural-style-transfer VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/advanced/variational_autoencoder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(variational-autoencoder VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/basics/feedforward_neural_network/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(feedforward-neural-network VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/basics/linear_regression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(linear-regression VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/basics/logistic_regression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(logistic-regression VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/basics/pytorch_basics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(pytorch-basics VERSION 1.0.0 LANGUAGES CXX)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(bidirectional-recurrent-neural-network VERSION 1.0.0 LANGUAGES CXX)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(convolutional-neural-network VERSION 1.0.0 LANGUAGES CXX)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(deep-residual-network VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/intermediate/language_model/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(language-model VERSION 1.0.0 LANGUAGES CXX)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(recurrent-neural-network VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/popular/blitz/autograd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(autograd VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/popular/blitz/neural_networks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(neural-networks VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion tutorials/popular/blitz/tensors/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(tensors VERSION 1.0.0 LANGUAGES CXX)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(training-a-classifier VERSION 1.0.0 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion utils/image_io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(image-io VERSION 1.0.0 LANGUAGES CXX)

Expand Down

0 comments on commit e92e8e1

Please sign in to comment.