Skip to content

Commit 58ba726

Browse files
Merge branch 'main' into expose_start_positions_rope
2 parents 55ab61d + d2bd9fa commit 58ba726

File tree

163 files changed

+23702
-2319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+23702
-2319
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ megatron/core/parallel_state.py @NVIDIA/core-adlr @NVIDIA/core-nemo
3333

3434
megatron/core/post_training/ @NVIDIA/core-adlr @NVIDIA/core-nemo @NVIDIA/post-training
3535

36-
megatron/post_training/ @NVIDIA/core-adlr @NVIDIA/core-nemo @NVIDIA/post-training
36+
megatron/post_training/ @NVIDIA/post-training
3737

3838
.gitlab/ @NVIDIA/ci
3939
.github/ @NVIDIA/ci

.github/workflows/_build_test_publish_wheel.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
on:
22
workflow_call:
3+
inputs:
4+
ref:
5+
required: false
6+
description: Ref (SHA or branch) to release
7+
type: string
8+
default: ${{ github.sha }}
9+
dry-run:
10+
required: false
11+
description: Upload to PyPy Test instance
12+
type: boolean
13+
default: true
14+
no-publish:
15+
required: false
16+
description: Do not publish the wheel
17+
type: boolean
18+
default: true
319
secrets:
420
TWINE_USERNAME:
521
required: true
@@ -26,17 +42,18 @@ jobs:
2642
PACKAGE: ${{ matrix.PACKAGE }}
2743
IMAGE: ${{ matrix.IMAGE }}
2844
PLATFORM: ${{ matrix.PLATFORM }}
45+
PUBLISH_DRYRUN: ${{ inputs.dry-run }}
2946
steps:
3047
- name: Checkout repository
3148
uses: actions/checkout@v4
49+
with:
50+
ref: ${{ inputs.ref }}
3251

3352
- name: Build wheel
3453
id: build-wheel
3554
run: |
3655
set -x
3756
38-
PUBLISH_DRYRUN=yes
39-
4057
if [ "$PACKAGE" = "megatron-core" ]; then
4158
ROOTDIR="megatron/core"
4259
BUILD_DIR="."
@@ -48,7 +65,7 @@ jobs:
4865
exit 1
4966
fi
5067
51-
if [ "$PUBLISH_DRYRUN" = "yes" ]; then
68+
if [ "$PUBLISH_DRYRUN" = "true" ]; then
5269
PRE_RELEASE=$(sed -n "s/.*PRE_RELEASE = '\(.*\)'/\1/p" $ROOTDIR/package_info.py)
5370
sed -i "/^PRE_RELEASE/c\PRE_RELEASE = '${PRE_RELEASE}.dev$((RANDOM % 900000 + 100000))'" $ROOTDIR/package_info.py
5471
fi
@@ -123,26 +140,31 @@ jobs:
123140
- name: Upload wheels
124141
uses: actions/upload-artifact@v4
125142
with:
126-
name: wheels-${{ matrix.PACKAGE }}-${{ matrix.PLATFORM }}
143+
name: wheels-${{ matrix.PACKAGE }}-${{ matrix.PLATFORM }}-${{ inputs.dry-run && 'dry-run' || 'release' }}
127144
path: dist/
128145

129146
publish-wheels:
130147
needs: [build-and-test-wheels]
131148
runs-on: ubuntu-latest
132-
if: github.ref == 'refs/heads/main'
149+
if: inputs.no-publish == false
133150
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/r')) && 'main' || 'public' }}
134151
strategy:
135152
fail-fast: false
136153
matrix:
137154
include:
138-
- PACKAGE: megatron_core
139-
- PACKAGE: megatron_fsdp
155+
- PACKAGE: megatron-core
156+
PLATFORM: arm64
157+
- PACKAGE: megatron-core
158+
PLATFORM: amd64
159+
- PACKAGE: megatron-fsdp
160+
IMAGE: quay.io/pypa/manylinux_2_28_x86_64
140161
env:
141162
PACKAGE: ${{ matrix.PACKAGE }}
142163
steps:
143164
- name: Download wheels
144165
uses: actions/download-artifact@v4
145166
with:
167+
name: wheels-${{ matrix.PACKAGE }}-${{ matrix.PLATFORM }}-${{ inputs.dry-run && 'dry-run' || 'release' }}
146168
path: dist/
147169
merge-multiple: true
148170

0 commit comments

Comments
 (0)