Skip to content

Commit

Permalink
Merge pull request #233 from Cambridge-ICCS/minor-build-tweaks
Browse files Browse the repository at this point in the history
Minor build tweaks
  • Loading branch information
jwallwork23 authored Jan 14, 2025
2 parents d5046a3 + 82249a7 commit 542255e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 8 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ To install the library requires the following to be installed on the system:

<sup>*</sup> _The minimal example provided downloads the CPU-only Linux Nightly binary. [Alternative versions](https://pytorch.org/get-started/locally/) may be required._

#### Additional dependencies of the test suite

FTorch's test suite has some additional dependencies.

* You will also need to install the unit testing framework
[pFUnit](https://github.com/Goddard-Fortran-Ecosystem/pFUnit).
* FTorch's test suite requires that [PyTorch](https://pytorch.org/) has been
installed, as opposed to LibTorch. We recommend installing `torchvision` in
the same command (e.g., `pip install torch torchvision`)<sup>*</sup>. Doing so
ensures that `torch` and `torchvision` are configured in the same way.
* Other Python modules are installed automatically by the `run_test_suite.sh`
test script (or `run_test_suite.bat` on Windows).


<sup>*</sup> _For more details, see [here](https://pytorch.org/get-started/locally/)._

#### Windows Support

If building in a Windows environment then you can either use
Expand Down
2 changes: 1 addition & 1 deletion examples/1_SimpleNet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
# policy CMP0076 - target_sources source files are relative to file where
# target_sources is run
cmake_policy(SET CMP0076 NEW)
Expand Down
2 changes: 1 addition & 1 deletion examples/2_ResNet18/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
# policy CMP0076 - target_sources source files are relative to file where
# target_sources is run
cmake_policy(SET CMP0076 NEW)
Expand Down
2 changes: 1 addition & 1 deletion examples/3_MultiGPU/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
# policy CMP0076 - target_sources source files are relative to file where
# target_sources is run
cmake_policy(SET CMP0076 NEW)
Expand Down
2 changes: 1 addition & 1 deletion examples/4_MultiIO/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
# policy CMP0076 - target_sources source files are relative to file where
# target_sources is run
cmake_policy(SET CMP0076 NEW)
Expand Down
2 changes: 1 addition & 1 deletion examples/5_Looping/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
# policy CMP0076 - target_sources source files are relative to file where
# target_sources is run
cmake_policy(SET CMP0076 NEW)
Expand Down
2 changes: 1 addition & 1 deletion examples/6_Autograd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
# policy CMP0076 - target_sources source files are relative to file where
# target_sources is run
cmake_policy(SET CMP0076 NEW)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
set(PROJECT_NAME FTorch)
set(LIB_NAME ftorch)
set(PACKAGE_VERSION 0.1)
Expand Down
2 changes: 1 addition & 1 deletion src/test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15...3.31)
cmake_policy (SET CMP0076 NEW)

project("FTorch unit tests" VERSION 1.0.0 LANGUAGES Fortran)
Expand Down

0 comments on commit 542255e

Please sign in to comment.