-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from arjunsuresh/mlperf-inference
Merge
- Loading branch information
Showing
12 changed files
with
192 additions
and
6 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,16 @@ | ||
alias: authenticate-github-cli | ||
automation_alias: script | ||
automation_uid: 5b4e0237da074764 | ||
cache: true | ||
input_mapping: | ||
with_token: CM_GH_AUTH_TOKEN | ||
with-token: CM_GH_AUTH_TOKEN | ||
tags: | ||
- auth | ||
- authenticate | ||
- github | ||
- gh | ||
- cli | ||
uid: 7b57673ac14a4337 | ||
deps: | ||
- tags: get,gh,cli |
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,27 @@ | ||
from cmind import utils | ||
import os | ||
|
||
def preprocess(i): | ||
|
||
os_info = i['os_info'] | ||
|
||
env = i['env'] | ||
|
||
meta = i['meta'] | ||
|
||
automation = i['automation'] | ||
|
||
cmd = "gh auth login" | ||
if env.get('CM_GH_AUTH_TOKEN', '') != '': | ||
cmd = f" echo {env['CM_GH_AUTH_TOKEN']} | {cmd} --with-token" | ||
|
||
env['CM_RUN_CMD'] = cmd | ||
quiet = (env.get('CM_QUIET', False) == 'yes') | ||
|
||
return {'return':0} | ||
|
||
def postprocess(i): | ||
|
||
env = i['env'] | ||
|
||
return {'return':0} |
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 @@ | ||
rem native script |
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,18 @@ | ||
#!/bin/bash | ||
|
||
#CM Script location: ${CM_TMP_CURRENT_SCRIPT_PATH} | ||
|
||
#To export any variable | ||
#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out | ||
|
||
#${CM_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency | ||
|
||
echo "Running: " | ||
echo "${CM_RUN_CMD}" | ||
echo "" | ||
|
||
if [[ ${CM_FAKE_RUN} != "yes" ]]; then | ||
eval "${CM_RUN_CMD}" | ||
test $? -eq 0 || exit 1 | ||
fi | ||
|
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
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,22 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -e ${CM_NVIDIA_MLPERF_SCRATCH_PATH}/models/GPTJ-6B/checkpoint-final ]]; then | ||
cp -r ${GPTJ_CHECKPOINT_PATH} ${CM_NVIDIA_MLPERF_SCRATCH_PATH}/models/GPTJ-6B/ | ||
test $? -eq 0 || exit $? | ||
fi | ||
|
||
echo "cd ${CM_TENSORRT_LLM_CHECKOUT_PATH}" | ||
cd ${CM_TENSORRT_LLM_CHECKOUT_PATH} | ||
|
||
make -C docker build | ||
test $? -eq 0 || exit $? | ||
|
||
RUN_CMD="bash -c '${CM_PYTHON_BIN_WITH_PATH} scripts/build_wheel.py -a=${CM_GPU_ARCH} --clean --install --trt_root /usr/local/tensorrt/ && python examples/quantization/quantize.py --dtype=float16 --output_dir=/mnt/models/GPTJ-6B/fp8-quantized-ammo/GPTJ-FP8-quantized --model_dir=/mnt/models/GPTJ-6B/checkpoint-final --qformat=fp8 --kv_cache_dtype=fp8 '" | ||
DOCKER_RUN_ARGS=" -v ${CM_NVIDIA_MLPERF_SCRATCH_PATH}:/mnt" | ||
export DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS" | ||
export RUN_CMD="$RUN_CMD" | ||
make -C docker run LOCAL_USER=1 | ||
test $? -eq 0 || exit $? | ||
|
||
${CM_PYTHON_BIN_WITH_PATH} ${CM_MLPERF_INFERENCE_NVIDIA_CODE_PATH}/code/gptj/tensorrt/onnx_tune.py --fp8-scalers-path=${CM_NVIDIA_MLPERF_SCRATCH_PATH}/models/GPTJ-6B/fp8-quantized-ammo/GPTJ-FP8-quantized/rank0.safetensors --scaler 1.005 --index 15 | ||
test $? -eq 0 || exit $? |
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