-
Notifications
You must be signed in to change notification settings - Fork 35
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
[libshortfin] Add workflow to build nightly packages. #238
Conversation
fc6aed5
to
a1361f4
Compare
@@ -324,7 +359,7 @@ def populate_built_package(abs_dir): | |||
|
|||
setup( | |||
name="shortfin", | |||
version="0.9", | |||
version=f"{PACKAGE_VERSION}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to not set this to 0.9
here but just as a note, we still do this here
https://github.com/nod-ai/SHARK-Platform/blob/6c8272042a39860e13ee548967bb1c1fcd404c60/shortfin/CMakeLists.txt#L18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah more work will be needed to fully plumb versions (including stable, nightly, and dev) through each part of the projects. I tried to focus on the minimal changes needed to get a nightly release going here. In IREE we have some CMake options: https://github.com/iree-org/iree/blob/6c47f631855ced5f48d4897df11784f81ae24386/CMakeLists.txt#L84-L88 that get set through setup.py
and other scripts: https://github.com/iree-org/iree/blob/6c47f631855ced5f48d4897df11784f81ae24386/compiler/setup.py#L162-L169
- runs-on: ubuntu-24.04 | ||
platform: linux-x86_64 | ||
package: shortfin | ||
python-version: cp313-cp313 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to pre-build with a non-free-threaded 3.13 at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably? @stellaraccident , opinions? I think we'll want to publish for both flavors of python 3.13, but I'm not sure how pip handles that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading through https://py-free-threading.github.io/.
- Building with
cp313-cp313t
(note thet
) seems to work, even with manylinux2014. - Going to figure out how to test next
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested. Free threaded seems to work fine.
$ sudo apt-get install python3.13-nogil
$ python3.13t -m venv 3.13t.venv
$ source 3.13t.venv/bin/activate
$ python -c "import sys; print(sys._is_gil_enabled())"
False
$ python -m pip install shortfin -f https://github.com/ScottTodd/SHARK-Platform/releases/expanded_assets/dev-wheels
Looking in links: https://github.com/ScottTodd/SHARK-Platform/releases/expanded_assets/dev-wheels
Collecting shortfin
Downloading https://github.com/ScottTodd/SHARK-Platform/releases/download/dev-wheels/shortfin-20240930.17-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 46.9 MB/s eta 0:00:00
Installing collected packages: shortfin
Successfully installed shortfin-20240930.17
$ python
>>> import shortfin as sf
Use pinned version. Co-authored-by: Marius Brehler <[email protected]>
Progress on #130, follow-up to #230.
Overview
This gets us the general structure of a release pipeline that:
shortfin/build_tools/build_linux_package.sh
, which runspython -m pip wheel
under a manylinux Docker containerThis follows how stablehlo (https://github.com/openxla/stablehlo/releases/tag/dev-wheels) and torch-mlir (https://github.com/llvm/torch-mlir-release/releases/tag/dev-wheels) both publish to a constantly growing "dev-wheels" release rather than separate releases like IREE does. That makes it harder to directly "promote" a candidate release, but it avoids polluting the release history with nightly builds.
Testing
python -m pip install shortfin -f https://github.com/ScottTodd/SHARK-Platform/releases/expanded_assets/dev-wheels
What's next
In no particular order,
SHORTFIN_ENABLE_TRACING
is functionalpip install shortfin
and have it bring along a compatible version of packages likeiree-runtime
andiree-compiler