This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
additional updates to "bump-to-v0.3.2" (#39)
SUMMARY * update `TORCH_CUDA_ARCH_LIST` to match `magic_wand` * update "test vllm" action to run tests serially * add helper script to find *.py tests, run them serially, and output JUnit formatted xml TEST working through changes manually on debug instance --------- Co-authored-by: andy-neuma <andy@neuralmagic.com>
- Loading branch information
1 parent
4b44479
commit 9209f15
Showing
7 changed files
with
106 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
name: set neuralmagic env | ||
description: 'sets environment variables for neuralmagic' | ||
inputs: | ||
hf_home: | ||
hf_token: | ||
description: 'Hugging Face home' | ||
required: true | ||
Gi_per_thread: | ||
description: 'requested GiB to reserve per thread' | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
echo "HF_HOME=${HF_HOME_TOKEN}" >> $GITHUB_ENV | ||
echo "TORCH_CUDA_ARCH_LIST=8.0+PTX" >> $GITHUB_ENV | ||
echo "HF_TOKEN=${HF_TOKEN_SECRET}" >> $GITHUB_ENV | ||
NUM_THREADS=$(./.github/scripts/determine-threading -G ${{ inputs.Gi_per_thread }}) | ||
echo "MAX_JOBS=${NUM_THREADS}" >> $GITHUB_ENV | ||
echo "VLLM_INSTALL_PUNICA_KERNELS=1" >> $GITHUB_ENV | ||
echo "PYENV_ROOT=/usr/local/apps/pyenv" >> $GITHUB_ENV | ||
echo "XDG_CONFIG_HOME=/usr/local/apps" >> $GITHUB_ENV | ||
WHOAMI=$(whoami) | ||
echo "PATH=/usr/local/apps/pyenv/plugins/pyenv-virtualenv/shims:/usr/local/apps/pyenv/shims:/usr/local/apps/pyenv/bin:/usr/local/apps/nvm/versions/node/v16.20.2/bin:/usr/local/cuda-12.1/bin:/usr/local/cuda-12.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/${WHOAMI}/.local/bin:" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64::/usr/local/cuda-12.1/lib64:" >> $GITHUB_ENV | ||
echo "PROJECT_ID=12" >> $GITHUB_ENV | ||
env: | ||
HF_HOME_TOKEN: ${{ inputs.hf_home }} | ||
HF_TOKEN_SECRET: ${{ inputs.hf_token }} | ||
shell: bash |
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,6 @@ | ||
SUMMARY: | ||
"please provide a brief summary" | ||
|
||
TEST PLAN: | ||
"please outline how the changes were tested" | ||
|
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,66 @@ | ||
#!/bin/bash -e | ||
|
||
# simple helper script to manage concurrency while running tests | ||
|
||
usage() { | ||
echo "Usage: ${0} <options>" | ||
echo | ||
echo " -t - test directory, i.e. location of *.py test files. (default 'tests/')" | ||
echo " -r - desired results base directory. xml results will mirror provided tests directory structure. (default 'test-results/')" | ||
echo " -h - this list of options" | ||
echo | ||
echo "note: all paths are relative to 'neuralmagic-vllm' root" | ||
echo | ||
exit 1 | ||
} | ||
|
||
TEST_DIR=tests | ||
RESULTS_DIR=test-results | ||
|
||
while getopts "ht:r:" OPT; do | ||
case "${OPT}" in | ||
h) | ||
usage | ||
;; | ||
t) | ||
TEST_DIR="${OPTARG}" | ||
;; | ||
r) | ||
RESULTS_DIR="${OPTARG}" | ||
;; | ||
esac | ||
done | ||
|
||
# check if variables are valid | ||
if [ -z "${RESULTS_DIR}" ]; then | ||
echo "please set desired results base directory" | ||
usage | ||
fi | ||
|
||
if [ -z "${TEST_DIR}" ]; then | ||
echo "please set test directory" | ||
usage | ||
fi | ||
|
||
if [ ! -d "${TEST_DIR}" ]; then | ||
echo "specified test directory, '${TEST_DIR}' does not exist ..." | ||
usage | ||
fi | ||
|
||
# run tests serially | ||
TESTS_DOT_PY=$(find ${TEST_DIR} -not -name "__init__.py" -name "*.py") | ||
TESTS_TO_RUN=($TESTS_DOT_PY) | ||
SUCCESS=0 | ||
for TEST in "${TESTS_TO_RUN[@]}" | ||
do | ||
LOCAL_SUCCESS=0 | ||
RESULT_XML=$(echo ${TEST} | sed -e "s/${TEST_DIR}/${RESULTS_DIR}/" | sed -e "s/.py/.xml/") | ||
pytest --junitxml=${RESULT_XML} ${TEST} || LOCAL_SUCCESS=$? | ||
SUCCESS=$((SUCCESS + LOCAL_SUCCESS)) | ||
done | ||
|
||
if [ "${SUCCESS}" -eq "0" ]; then | ||
exit 0 | ||
else | ||
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