-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes a few issues found when debugging powderluv's setup.
* It is optional to link against Python3_LIBRARIES. Check that and don't do it if they don't exist for this config. * Clean and auditwheel need to operate on sanitized package names. So "torch_mlir" vs "torch-mlir". * Adds a pyproject.toml file that pins the build dependencies needed to detect both Torch and Python (the MLIR Python build was failing to detect because Numpy wasn't in the pip venv). * Commented out auditwheel: These wheels are not PyPi compliant since they weak link to libtorch at runtime. However, they should be fine to deploy to users. * Adds the --extra-index-url to the pip wheel command, allowing PyTorch to be found. * Hack setup.py to remove the _mlir_libs dir before building. This keeps back-to-back versions from accumulating in the wheels for subsequent versions. IREE has a more principled way of doing this, but what I have here should work.
- Loading branch information
1 parent
e13911a
commit c39a90e
Showing
4 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[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.dev20220419+cpu", | ||
] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters