mirror of https://github.com/llvm/torch-mlir
release: pin PyTorch version in release requirements (#1435)
Prior to this patch, the release process (`pip wheel`) retrieved dependencies from the pyproject.toml file, which specified a version of PyTorch that defaulted to the most recent nightly release. Instead, we want the release process to use the same pinned PyTorch version as the development build of PyTorch. Since TOML files can't reference the pytorch-requirements.txt file, this patch puts the dependencies from pyproject.toml into whl-requirements.txt, which references pytorch-requirements.txt.pull/1442/head
parent
2509641cab
commit
95ffa27733
|
@ -321,11 +321,13 @@ function clean_build() {
|
|||
}
|
||||
|
||||
function build_torch_mlir() {
|
||||
python -m pip install --upgrade -r /main_checkout/torch-mlir/requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/cpu
|
||||
python -m pip install --upgrade -r /main_checkout/torch-mlir/requirements.txt \
|
||||
--extra-index-url https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
|
||||
CMAKE_GENERATOR=Ninja \
|
||||
TORCH_MLIR_PYTHON_PACKAGE_VERSION=${TORCH_MLIR_PYTHON_PACKAGE_VERSION} \
|
||||
python -m pip wheel -v -w /wheelhouse /main_checkout/torch-mlir/ \
|
||||
--extra-index-url https://download.pytorch.org/whl/nightly/cpu
|
||||
python -m pip wheel -v -w /wheelhouse /main_checkout/torch-mlir \
|
||||
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html \
|
||||
-r /main_checkout/torch-mlir/whl-requirements.txt
|
||||
}
|
||||
|
||||
function run_audit_wheel() {
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
"wheel",
|
||||
# There is no fundamental reason to pin this CMake version, beyond
|
||||
# build stability.
|
||||
"cmake==3.22.2",
|
||||
"ninja==1.10.2",
|
||||
"packaging",
|
||||
# Version 2.7.0 excluded: https://github.com/pybind/pybind11/issues/3136
|
||||
"pybind11>=2.6.0,!=2.7.0",
|
||||
"PyYAML",
|
||||
|
||||
# The torch-mlir CMake build requires numpy and torch to be installed.
|
||||
# Further, the setup.py will pin the version selected here into built
|
||||
# artifacts.
|
||||
# TODO: Come up with a better way to pin the version.
|
||||
"numpy",
|
||||
"torch>=1.12.0.dev20220420",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
|
@ -0,0 +1,10 @@
|
|||
-f pytorch-requirements.txt
|
||||
|
||||
setuptools>=42
|
||||
wheel
|
||||
cmake==3.22.2
|
||||
ninja==1.10.2
|
||||
packaging
|
||||
pybind11>=2.6.0,!=2.7.0
|
||||
PyYAML
|
||||
numpy
|
Loading…
Reference in New Issue