Skip to content

Commit 4a815ed

Browse files
ci: Set minimum cmake version for halide build (#154122)
ci: Set minimum cmake version for halide build (#150560) This was failing due to pybind being strict about their cmake version requirements. This resolves errors like: ``` 652.1 Compatibility with CMake < 3.5 has been removed from CMake. 652.1 652.1 Update the VERSION argument <min> value. Or, use the <min>...<max> syntax 652.1 to tell CMake that the project requires at least <min> but has been updated 652.1 to work with policies introduced by <max> or earlier. 652.1 652.1 Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. 652.1 652.1 652.1 -- Configuring incomplete, errors occurred! ``` Tested this locally with the following command: ``` ./build.sh pytorch-linux-jammy-py3.12-halide -t 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-jammy-py3.12-halide:8a8989876ff1aa1d5b0e465177afebbc7a9da921 ``` Closes #150420 Pull Request resolved: #150560 Approved by: https://github.com/clee2000, https://github.com/ZainRizvi, https://github.com/atalman, https://github.com/malfet (cherry picked from commit af5c1b9) Signed-off-by: Eli Uriegas <[email protected]> Co-authored-by: Eli Uriegas <[email protected]>
1 parent 4c7314e commit 4a815ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.ci/docker/common/install_halide.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ git clone https://github.com/halide/Halide.git
3535
pushd Halide
3636
git checkout ${COMMIT} && git submodule update --init --recursive
3737
pip_install -r requirements.txt
38-
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -S . -B build
38+
# NOTE: pybind has a requirement for cmake > 3.5 so set the minimum cmake version here with a flag
39+
# Context: https://github.com/pytorch/pytorch/issues/150420
40+
cmake -G Ninja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -S . -B build
3941
cmake --build build
4042
test -e ${CONDA_PREFIX}/lib/python3 || ln -s python${ANACONDA_PYTHON_VERSION} ${CONDA_PREFIX}/lib/python3
4143
cmake --install build --prefix ${CONDA_PREFIX}

0 commit comments

Comments
 (0)