From ed7d70a5fb96defbf3888d236a6d93533fccfdc9 Mon Sep 17 00:00:00 2001 From: Liam Sturge Date: Tue, 1 Aug 2023 17:24:10 +0100 Subject: [PATCH 1/5] Pin Cython fix for compilation Cython 3.0.0 was recently released, but it is incompatible with the current .pxi definitions in python/tvm/_ffi/_cpython. Cython has been pinned for TVM in PR: 15353 until a working fix is created. This patch replicates many of the changes for TLCPack installation, as we are seeing the same Cython errors when trying to use TLCPack Ubuntu Docker images. --- .github/workflows/conda_cpu_nigthly.yaml | 2 +- .github/workflows/wheel_winmac_nightly.yaml | 10 +++++----- conda/recipe/meta.in.yaml | 2 +- docker/install/centos_install_python_package.sh | 2 +- docker/install/ubuntu_install_python_package.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/conda_cpu_nigthly.yaml b/.github/workflows/conda_cpu_nigthly.yaml index aaa7d99..e395e2b 100644 --- a/.github/workflows/conda_cpu_nigthly.yaml +++ b/.github/workflows/conda_cpu_nigthly.yaml @@ -56,7 +56,7 @@ jobs: if: startsWith(matrix.os, 'macOS') shell: bash -l {0} env: - MACOSX_DEPLOYMENT_TARGET: 10.15 + MACOSX_DEPLOYMENT_TARGET: 11.7 run: >- conda build --output-folder=conda/pkg -m conda/build_config.yaml conda/recipe - name: Conda-Build@Linux diff --git a/.github/workflows/wheel_winmac_nightly.yaml b/.github/workflows/wheel_winmac_nightly.yaml index 98e35e3..e716902 100644 --- a/.github/workflows/wheel_winmac_nightly.yaml +++ b/.github/workflows/wheel_winmac_nightly.yaml @@ -54,7 +54,7 @@ jobs: run: >- wheel/build_lib_osx.sh env: - MACOSX_DEPLOYMENT_TARGET: 10.15 + MACOSX_DEPLOYMENT_TARGET: 11.7 - name: Build@Win if: startsWith(matrix.os, 'windows') shell: cmd /C call {0} @@ -66,9 +66,9 @@ jobs: python-version: 3.7 - name: Wheel-Build@Py37 env: - MACOSX_DEPLOYMENT_TARGET: 10.15 + MACOSX_DEPLOYMENT_TARGET: 11.7 run: | - python -m pip install setuptools Cython wheel + python -m pip install setuptools Cython==0.29.34 wheel cd tvm/python python setup.py bdist_wheel - uses: actions/setup-python@v2 @@ -76,9 +76,9 @@ jobs: python-version: 3.8 - name: Wheel-Build@Py38 env: - MACOSX_DEPLOYMENT_TARGET: 10.15 + MACOSX_DEPLOYMENT_TARGET: 11.7 run: | - python -m pip install setuptools Cython wheel + python -m pip install setuptools Cython==0.29.34 wheel cd tvm/python python setup.py bdist_wheel # Use system python instead of conda for upload diff --git a/conda/recipe/meta.in.yaml b/conda/recipe/meta.in.yaml index 33b6715..2f1646e 100644 --- a/conda/recipe/meta.in.yaml +++ b/conda/recipe/meta.in.yaml @@ -60,7 +60,7 @@ outputs: host: - python - setuptools - - cython + - cython >=0.29.34 - {{ pin_subpackage(pkg_name + '-libs', exact=True) }} run: - python diff --git a/docker/install/centos_install_python_package.sh b/docker/install/centos_install_python_package.sh index e835501..a8ba5ff 100644 --- a/docker/install/centos_install_python_package.sh +++ b/docker/install/centos_install_python_package.sh @@ -6,7 +6,7 @@ source /multibuild/manylinux_utils.sh eval "$(conda shell.bash hook)" -PYTHON_PACKAGES="six numpy pytest cython decorator scipy tornado typed_ast mypy \ +PYTHON_PACKAGES="six numpy pytest cython==0.29.34 decorator scipy tornado typed_ast mypy \ orderedset antlr4-python3-runtime attrs requests Pillow packaging junitparser synr cloudpickle xgboost==1.5.0" for env in $(conda env list | grep py | awk '{print $1}'); do diff --git a/docker/install/ubuntu_install_python_package.sh b/docker/install/ubuntu_install_python_package.sh index ed56b41..7eab2bb 100755 --- a/docker/install/ubuntu_install_python_package.sh +++ b/docker/install/ubuntu_install_python_package.sh @@ -4,7 +4,7 @@ set -e set -u set -o pipefail -PYTHON_PACKAGES="six numpy pytest cython decorator scipy tornado typed_ast mypy \ +PYTHON_PACKAGES="six numpy pytest cython==0.29.34 decorator scipy tornado typed_ast mypy \ orderedset antlr4-python3-runtime attrs requests Pillow packaging junitparser synr cloudpickle xgboost==1.5.0" # install libraries for python package on ubuntu From e4764d520f31b28c1864e8c777045f729b27303e Mon Sep 17 00:00:00 2001 From: Liam Sturge Date: Wed, 2 Aug 2023 10:58:31 +0100 Subject: [PATCH 2/5] Pin Numpy version to fix CI nightly builds The CI Conda build is failing to complete the workflow conda_cpu_nightly due to an error relating to Numpy. Error is `ValueError: Incompatible component merge: mpi_openmpi_*` Bumping the version of Numpy to resolve the problem. --- conda/build-environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/build-environment.yaml b/conda/build-environment.yaml index 78e6e6b..18cda37 100644 --- a/conda/build-environment.yaml +++ b/conda/build-environment.yaml @@ -10,7 +10,7 @@ dependencies: - anaconda-client - git - llvmdev ==10.0.0 - - numpy + - numpy >=1.17 - pytest - cmake - bzip2 From 4e4a507e2da4b5fa302725157c032e45e8c1e6ef Mon Sep 17 00:00:00 2001 From: Liam Sturge Date: Wed, 2 Aug 2023 11:53:54 +0100 Subject: [PATCH 3/5] Pin numpy version for Conda builds Pinned the version available to Conda in the conda_build_config file. --- conda/recipe/conda_build_config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conda/recipe/conda_build_config.yaml b/conda/recipe/conda_build_config.yaml index 46a5454..706d526 100644 --- a/conda/recipe/conda_build_config.yaml +++ b/conda/recipe/conda_build_config.yaml @@ -5,3 +5,6 @@ python: cuda: - False + +numpy: + - 1.17 From d05b348223094a323aa31841165cb17365172839 Mon Sep 17 00:00:00 2001 From: Liam Sturge Date: Wed, 2 Aug 2023 13:29:16 +0100 Subject: [PATCH 4/5] Pin numpy version for Conda builds Bumped minimum required NumPy version in the Conda recipe to fix build issues. --- conda/recipe/meta.in.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/recipe/meta.in.yaml b/conda/recipe/meta.in.yaml index 2f1646e..572caf0 100644 --- a/conda/recipe/meta.in.yaml +++ b/conda/recipe/meta.in.yaml @@ -68,7 +68,7 @@ outputs: - psutil - scipy - pytest - - {{ pin_compatible('numpy') }} + - {{ pin_compatible('numpy', lower_bound='1.17', max_pin='x.x') }} - {{ pin_subpackage(pkg_name + '-libs', exact=True) }} about: From f17f4f666723548dfbbd1495427d25f67bebe91c Mon Sep 17 00:00:00 2001 From: Liam Sturge Date: Wed, 2 Aug 2023 16:47:12 +0100 Subject: [PATCH 5/5] Pin NumPy version in meta host Pinning the version of NumPy to v1.17 due to failures seen with the error 'ValueError: Incompatible component merge: mpi_openmpi_*', which relates to NumPy. --- conda/recipe/meta.in.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/recipe/meta.in.yaml b/conda/recipe/meta.in.yaml index 572caf0..f353f6a 100644 --- a/conda/recipe/meta.in.yaml +++ b/conda/recipe/meta.in.yaml @@ -61,6 +61,7 @@ outputs: - python - setuptools - cython >=0.29.34 + - {{ pin_compatible('numpy', lower_bound='1.17', max_pin='x.x') }} - {{ pin_subpackage(pkg_name + '-libs', exact=True) }} run: - python