Skip to content

Commit 89bbeb7

Browse files
authored
Merge branch 'NVIDIA:main' into fused_out_correction
2 parents 9d7e3cf + e4c99b0 commit 89bbeb7

Some content is hidden

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

55 files changed

+3319
-3823
lines changed

.github/workflows/deploy_nightly_docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Download artifact
19-
uses: actions/download-artifact@v4.1.7
19+
uses: actions/download-artifact@v4
2020
with:
2121
name: "te_docs"
2222
path: "html"
2323
- name: Prepare for pages
2424
uses: actions/[email protected]
2525
with:
26+
name: github-pages
2627
path: "html"
2728
deploy:
2829
needs: prepare

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
cd docs
2828
make html
2929
- name: 'Upload docs'
30-
uses: actions/upload-artifact@v3
30+
uses: actions/upload-artifact@v4
3131
with:
3232
name: te_docs
3333
path: docs/_build/html

.github/workflows/trigger-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
|| github.actor == 'vasunvidia'
4141
|| github.actor == 'erhoo82'
4242
|| github.actor == 'kocchop'
43+
|| github.actor == 'youngeunkwon0405'
44+
|| github.actor == 'KshitijLakhani'
4345
)
4446
steps:
4547
- name: Check if comment is issued by authorized person
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Megatron-LM
2+
vocab.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#version: 0.2

qa/L1_pytorch_mcore_integration/test.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,27 @@ set -e
88
: ${TE_PATH:=/opt/transformerengine}
99
: ${MCORE_PATH:=${TE_PATH}/qa/L1_pytorch_mcore_integration/Megatron-LM}
1010

11+
# Check whether FP8 is supported
12+
DEVICE_ARCH=$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | head -n 1 | sed 's/[^0-9]//g')
13+
if [[ ${DEVICE_ARCH} -ge 89 ]]; then
14+
WITH_FP8=1
15+
fi
16+
1117
# Download Megatron-LM if needed
1218
if [ ! -d "${MCORE_PATH}" ]; then
1319
pushd $(dirname ${MCORE_PATH})
1420
git clone -b core_r0.9.0 https://github.com/NVIDIA/Megatron-LM.git Megatron-LM
1521
popd
1622
fi
1723

24+
# Create mock vocab
25+
VOCAB_FILE=${TE_PATH}/qa/L1_pytorch_mcore_integration/vocab.json
26+
printf "" > ${VOCAB_FILE}
27+
printf "{" >> ${VOCAB_FILE}
28+
printf "\"<|endoftext|>\": 0" >> ${VOCAB_FILE}
29+
seq 1 4095 | awk '{ printf(", \"%d\": %d", $1, $1) }' >> ${VOCAB_FILE}
30+
printf "}" >> ${VOCAB_FILE}
31+
1832
# Megatron-LM invocation
1933
COMMAND="
2034
NVTE_TORCH_COMPILE=0
@@ -40,17 +54,17 @@ ${MCORE_PATH}/pretrain_gpt.py
4054
--hidden-size 128
4155
--num-attention-heads 8
4256
--seq-length 128
43-
--max-position-embeddings 2048
57+
--max-position-embeddings 128
4458
--micro-batch-size 1
4559
--global-batch-size 8
4660
--train-iters 10
4761
--eval-iters 10
4862
--lr 1e-4
4963
--mock-data
50-
--vocab-file /data/gpt3/pile-cc1-cc2-shuf/bpe/gpt2-vocab.json
51-
--merge-file /data/gpt3/pile-cc1-cc2-shuf/bpe/gpt2-merges.txt
64+
--vocab-file ${VOCAB_FILE}
65+
--merge-file ${TE_PATH}/qa/L1_pytorch_mcore_integration/merges.txt
5266
--transformer-impl transformer_engine
53-
--fp8-format hybrid
67+
${WITH_FP8:+--fp8-format hybrid}
5468
"
5569
COMMAND=$(echo "${COMMAND}" | tr '\n' ' ')
5670

tests/cpp/operator/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ add_executable(test_operator
1010
test_cast_transpose_dbias_dgelu.cu
1111
test_cast_transpose_dgeglu.cu
1212
test_act.cu
13-
test_layernorm.cu
14-
test_rmsnorm.cu
13+
test_normalization.cu
1514
test_multi_cast_transpose.cu
1615
test_multi_padding.cu
1716
test_causal_softmax.cu

0 commit comments

Comments
 (0)