pytorch / pytorch/vision

Minimum CMake version required to build.

Open
#2,085 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

module: c++ frontend
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

It seems like there are a sizable number of issues being created where people can't successfully compile the C++ code due to old CMake (#2076, #2001, #2045 ).
#2076 and #2001 are due to cmake forwarding unknown compiler flags to nvcc, and #2045 because a required CMake module (FindPython3) is only available on CMake 3.12+.
#2076 is fixed, accoding to the author, by upgrading to CMake 3.13.2 so I would expect #2001 to also be fixed with that version.

However 3.13 seems like a fairly high version requirement for the project, as that is beyond the current Ubuntu LTS default CMake (which is 3.10), even though CMake itself is quite easy to upgrade (prebuilt binaries are available on their website, and packages are also available on pip and conda).

I have WIP backport of the FindPython3 module and with that I manage to successfully compile torchvision with CMake 3.10 - I can't personally reproduce the errors in #2076 and #2001.

My idea is then to land the FindPython3 Module backport and require the minimum CMake version to be 3.10, and to tell people that experience nvcc-related build failures to upgrade their version to at least 3.13.
@fmassa what do you think?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed FindPython3 module backport and the CMake-related failures in issues #2076, #2001, and #2045. Verify whether the project builds with CMake 3.10, determine the minimum version needed for nvcc-related failures, and document the resulting requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.