-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build sharktank packages nightly. (#404)
Progress on #294. Once this is merged the nightly package builds will start pushing `sharktank-{VERSION}-py3-none-any.whl` to https://github.com/nod-ai/SHARK-Platform/releases/tag/dev-wheels alongside the existing shortfin wheels. Tested at https://github.com/ScottTodd/SHARK-Platform/actions/runs/11621153296/job/32364368882 (ignore the push failure at the end, missing a token). --- Note that the 250KB Python wheel can be _installed_ standalone, but actually _using_ it will need version bumps across projects and more work. In particular, I hit 1. Using iree-turbine from pypi: ``` from sharktank import ops ... ImportError: cannot import name 'dynamic_dim' from 'torch.export' (/home/nod/dev/scratch/shark-platform/3.11.venv/lib/python3.11/site-packages/torch/export/__init__.py) ``` That may be fixed by iree-org/iree-turbine#233 2. After installing iree-turbine from source: ``` from sharktank import ops ... from gguf import GGUFReader, GGUFValueType ModuleNotFoundError: No module named 'gguf' ``` Full logs here: https://gist.github.com/ScottTodd/4cd0c343a92375e7fbdaaf37c38bfc06
- Loading branch information
Showing
4 changed files
with
57 additions
and
2 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
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,25 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2024 Advanced Micro Devices, Inc. | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# build_linux_package.sh | ||
# | ||
# Builds sharktank Python package for Linux | ||
# | ||
# Usage: | ||
# ./build_tools/build_linux_package.sh | ||
|
||
set -xeu -o errtrace | ||
|
||
THIS_DIR="$(cd $(dirname $0) && pwd)" | ||
REPO_ROOT="$(cd "$THIS_DIR"/../../ && pwd)" | ||
OUTPUT_DIR="${OUTPUT_DIR:-${THIS_DIR}/wheelhouse}" | ||
|
||
python -m pip wheel --disable-pip-version-check --no-deps -v -w "${OUTPUT_DIR}" "${REPO_ROOT}/sharktank" | ||
|
||
wheel_output="$(echo "${OUTPUT_DIR}/sharktank-"*".whl")" | ||
ls "${wheel_output}" |
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