-
Notifications
You must be signed in to change notification settings - Fork 16
recreate wheel build PR #288
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9d10081
recreate wheel build PR
ebsmothers c2215af
fix copy-paste error
ebsmothers 28af813
cp -r
ebsmothers be114cd
add no-op smoke test
ebsmothers d8277ab
fix bad autocomplete
ebsmothers a4cef95
disable smoke test in my fork
ebsmothers f5c8cb5
idk maybe this will work?
ebsmothers a0aba88
use new commit hash
ebsmothers 166e5ed
use commit hash from main test-infra
ebsmothers 3c3078d
add commit hash in one more place
ebsmothers 1d75f28
debug
ebsmothers 5c5a1fa
[not for land] changes for faster debugging
ebsmothers 211b1e6
idk
ebsmothers ecc1dc0
no rsync
ebsmothers 65bec8e
final changes
ebsmothers 10acfef
correct comment
ebsmothers 2802de7
address comments
ebsmothers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,13 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
FORGE_WHEEL=${GITHUB_WORKSPACE}/${REPOSITORY}/dist/*.whl | ||
WHL_DIR="${GITHUB_WORKSPACE}/wheels/dist" | ||
DIST=dist/ | ||
|
||
ls -l "${WHL_DIR}" | ||
ls ${FORGE_WHEEL} | ||
echo "Copying files from $WHL_DIR to $DIST" | ||
mkdir -p $DIST && find "$WHL_DIR" -maxdepth 1 -type f -exec cp {} "$DIST/" \; | ||
echo "The following wheels will be uploaded to S3" | ||
ls -l "${DIST}" |
This file contains hidden or 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,32 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
# Builds vLLM | ||
# This script builds vLLM and places its wheel into dist/. | ||
|
||
VLLM_BRANCH="v0.10.0" | ||
BUILD_DIR="$HOME/forge-build" | ||
|
||
# Push other files to the dist folder | ||
WHL_DIR="${GITHUB_WORKSPACE}/wheels/dist" | ||
|
||
mkdir -p $BUILD_DIR | ||
mkdir -p $WHL_DIR | ||
echo "build dir is $BUILD_DIR" | ||
echo "wheel dir is $WHL_DIR" | ||
|
||
build_vllm() { | ||
cd "$BUILD_DIR" | ||
|
||
git clone https://github.com/vllm-project/vllm.git --branch $VLLM_BRANCH | ||
cd "$BUILD_DIR/vllm" | ||
|
||
python use_existing_torch.py | ||
pip install -r requirements/build.txt | ||
export VERBOSE=1 | ||
export CMAKE_VERBOSE_MAKEFILE=1 | ||
export FORCE_CMAKE=1 | ||
pip wheel -v --no-build-isolation --no-deps . -w "$WHL_DIR" | ||
} | ||
|
||
build_vllm | ||
This file contains hidden or 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,71 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
# Builds Monarch | ||
# This script builds Monarch and places its wheel into dist/. | ||
|
||
MONARCH_COMMIT="265034a29ec3fb35919f4a9c23c65f2f4237190d" | ||
BUILD_DIR="$HOME/forge-build" | ||
|
||
# Push other files to the dist folder | ||
WHL_DIR="${GITHUB_WORKSPACE}/wheels/dist" | ||
|
||
mkdir -p $BUILD_DIR | ||
mkdir -p $WHL_DIR | ||
echo "build dir is $BUILD_DIR" | ||
echo "wheel dir is $WHL_DIR" | ||
|
||
build_monarch() { | ||
# Get Rust build related pieces | ||
if ! command -v rustup &> /dev/null; then | ||
echo "getting rustup" | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
export PATH="$HOME/.cargo/bin:$PATH" | ||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
fi | ||
|
||
rustup toolchain install nightly | ||
rustup default nightly | ||
|
||
if command -v dnf &>/dev/null; then | ||
dnf install -y clang-devel \ | ||
libibverbs rdma-core libmlx5 libibverbs-devel rdma-core-devel fmt-devel \ | ||
libunwind-devel | ||
elif command -v apt-get &>/dev/null; then | ||
apt-get update | ||
apt-get install -y clang libunwind-dev \ | ||
libibverbs-dev librdmacm-dev libfmt-dev | ||
fi | ||
|
||
cd "$BUILD_DIR" | ||
git clone https://github.com/meta-pytorch/monarch.git | ||
cd "$BUILD_DIR/monarch" | ||
git checkout $MONARCH_COMMIT | ||
|
||
pip install -r build-requirements.txt | ||
export USE_TENSOR_ENGINE=1 | ||
export RUST_BACKTRACE=1 | ||
export CARGO_TERM_VERBOSE=true | ||
export CARGO_TERM_COLOR=always | ||
pip wheel --no-build-isolation --no-deps . -w "$WHL_DIR" | ||
} | ||
|
||
append_date() { | ||
cd ${GITHUB_WORKSPACE}/${REPOSITORY} | ||
# Appends the current date and time to the Forge wheel | ||
version_file="assets/version.txt" | ||
init_file="src/forge/__init__.py" | ||
if [[ -n "$BUILD_VERSION" ]]; then | ||
# Update the version in version.txt | ||
echo "$BUILD_VERSION" > "$version_file" | ||
# Create a variable named __version__ at the end of __init__.py | ||
echo "__version__ = \"$BUILD_VERSION\"" >> "$init_file" | ||
else | ||
echo "Error: BUILD_VERSION environment variable is not set or empty." | ||
exit 1 | ||
fi | ||
} | ||
|
||
|
||
build_monarch | ||
append_date |
This file contains hidden or 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,50 @@ | ||
name: Build pinned vLLM against PyTorch nightly and upload | ||
|
||
on: | ||
push: | ||
branches: | ||
- nightly | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: forge-cu129-nightly | ||
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@28a1b658404f17c8eabde5f7fe25ae3ac826fae6 | ||
strategy: | ||
fail-fast: false | ||
with: | ||
repository: meta-pytorch/forge | ||
ref: "" | ||
test-infra-repository: pytorch/test-infra | ||
test-infra-ref: 28a1b658404f17c8eabde5f7fe25ae3ac826fae6 | ||
run-smoke-test: false | ||
wheel-upload-path: preview/forge | ||
package-name: forge | ||
build-matrix: | | ||
{ | ||
"include": [ | ||
{ | ||
"python_version": "3.10", | ||
"gpu_arch_type": "cpu", | ||
"gpu_arch_version": "12.9", | ||
"desired_cuda": "cu129", | ||
"container_image": "pytorch/manylinux2_28-builder:cuda12.9", | ||
"package_type": "manywheel", | ||
"build_name": "manywheel-py3_10-cuda12_9", | ||
"validation_runner": "linux.12xlarge.memory", | ||
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129", | ||
"channel": "nightly", | ||
"upload_to_base_bucket": "no", | ||
"stable_version": "2.8.0", | ||
"use_split_build": false | ||
} | ||
] | ||
} | ||
pre-script: .github/packaging/pre_build_cpu.sh | ||
post-script: .github/packaging/post_build_script.sh | ||
trigger-event: ${{ github.event_name }} | ||
build-platform: 'python-build-package' |
This file contains hidden or 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,50 @@ | ||
name: Build nightly wheels and publish to PyTorch Index | ||
|
||
on: | ||
push: | ||
branches: | ||
- nightly | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: forge-cu129-nightly | ||
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@28a1b658404f17c8eabde5f7fe25ae3ac826fae6 | ||
strategy: | ||
fail-fast: false | ||
with: | ||
repository: meta-pytorch/forge | ||
ref: "" | ||
test-infra-repository: pytorch/test-infra | ||
test-infra-ref: 28a1b658404f17c8eabde5f7fe25ae3ac826fae6 | ||
run-smoke-test: false | ||
wheel-upload-path: preview/forge | ||
package-name: forge | ||
build-matrix: | | ||
{ | ||
"include": [ | ||
{ | ||
"python_version": "3.10", | ||
"gpu_arch_type": "cuda", | ||
"gpu_arch_version": "12.9", | ||
"desired_cuda": "cu129", | ||
"container_image": "pytorch/manylinux2_28-builder:cuda12.9", | ||
"package_type": "manywheel", | ||
"build_name": "manywheel-py3_10-cuda12_9", | ||
"validation_runner": "linux.4xlarge.nvidia.gpu", | ||
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129", | ||
"channel": "nightly", | ||
"upload_to_base_bucket": "no", | ||
"stable_version": "2.8.0", | ||
"use_split_build": false | ||
} | ||
] | ||
} | ||
pre-script: .github/packaging/pre_build_gpu.sh | ||
post-script: .github/packaging/post_build_script.sh | ||
trigger-event: ${{ github.event_name }} | ||
build-platform: 'python-build-package' |
This file contains hidden or 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 hidden or 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 @@ | ||
0.1.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
oh I wonder if we need to do the append_date here too. Which forge wheel ultimately gets uploaded?
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.
append_date is updating the forge wheel's name, right? Do we even care about that? (Actually if we are running this nightly shouldn't we be appending date to monarch and vllm wheels?)
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.
I guess that's true on both accounts. I dunno I'm not too opinionated