Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add oneshot release snapshot for test/ondemand #768

Merged
merged 2 commits into from
Apr 21, 2022
Merged

Add oneshot release snapshot for test/ondemand #768

merged 2 commits into from
Apr 21, 2022

Conversation

powderluv
Copy link
Collaborator

Add some build scripts to test new release flow based on IREE.
Wont affect current builds, once this works well we can plumb it
in.

@silvasean
Copy link
Contributor

silvasean commented Apr 20, 2022

Can you do a pass to scrub "IREE" out of the PR (except license stuff obviously) / replace it with the appropriate Torch-MLIR thing?

powderluv and others added 2 commits April 20, 2022 21:49
Add some build scripts to test new release flow based on IREE.
Wont affect current builds, once this works well we can plumb it
in.

Build with manylinux docker
* 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.
Copy link
Collaborator

@stellaraccident stellaraccident left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I took a pass through and fixed all the issues that I saw. It now builds wheels for me. I tried installing them in a venv that had a conflicting cuda install of Torch, and it indeed failed, working after I uninstalled. I was able to import it, so things seemed minimally working.

A few sharp edges I note in TODOs in the commit:

c39a90e

I just pushed to the manylinux branch in the main repo because that is what I have access to. Feel free to take my commit, use that branch or whatever.

build_tools/python_deploy/build_linux_packages.sh Outdated Show resolved Hide resolved
@powderluv
Copy link
Collaborator Author

Builds are successful. Thanks @stellaraccident . We can now create one of release builds. In the next PR I'll switch the nightly to build manylinux

@powderluv powderluv merged commit cc3a4a5 into llvm:main Apr 21, 2022
@powderluv powderluv deleted the manylinux branch April 21, 2022 09:19
qedawkins pushed a commit to nod-ai/torch-mlir that referenced this pull request Oct 3, 2022
* removing compiler warnings

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>

* format

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants