Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 39 additions & 36 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ on:
description: 'Wheel Build Server'
type: choice
options:
- '["self-hosted", "zen4"]'
- '["self-hosted", "xeon5"]'
- '["self-hosted", "zen4"]'

env:
CUDA_DEVICE_ORDER: PCI_BUS_ID
Expand Down Expand Up @@ -347,20 +347,20 @@ jobs:
echo "sha256=$sha256"
echo "SOURCE_DOWNLOADED=1" >> $GITHUB_ENV

- name: Download source from github
if: env.SOURCE_DOWNLOADED == '' && !cancelled()
uses: actions/download-artifact@v4
with:
name: source
path: dist
run-id: ${{ github.run_id }}

- name: Uncompress source
continue-on-error: true
run: |
find . -mindepth 1 ! -name "gptqmodel_source.tar.gz" -exec rm -rf {} +
ls -ahl .
tar -zxf gptqmodel_source.tar.gz
# - name: Download source from github
# if: env.SOURCE_DOWNLOADED == '' && !cancelled()
# uses: actions/download-artifact@v4
# with:
# name: source
# path: dist
# run-id: ${{ github.run_id }}

# - name: Uncompress source
# continue-on-error: true
# run: |
# find . -mindepth 1 ! -name "gptqmodel_source.tar.gz" -exec rm -rf {} +
# ls -ahl .
# tar -zxf gptqmodel_source.tar.gz

- name: Download wheel from local
continue-on-error: true
Expand Down Expand Up @@ -415,11 +415,13 @@ jobs:
timestamp=$(date +%s%3N)
gpu_id=-1

url="http://$XEON5/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }}"
echo "$url"
while [ "$gpu_id" -lt 0 ]; do
gpu_id=$(curl -s "http://$RUNNER/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }}")
gpu_id=$(curl -s "$url")

if [ "$gpu_id" -lt 0 ]; then
echo "http://$RUNNER/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }} returned $gpu_id"
echo "http://$XEON5/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }} returned $gpu_id"
echo "No available GPU, waiting 5 seconds..."
curl http://$XEON5/gpu/status2
sleep 5
Expand All @@ -446,7 +448,7 @@ jobs:

- name: Release GPU
if: always() && !contains(matrix.test_script, 'ipex')
run: curl -X GET "http://$RUNNER/gpu/release?id=${{ github.run_id }}&gpu=${{ env.CUDA_VISIBLE_DEVICES }}&timestamp=${{ env.STEP_TIMESTAMP }}&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}"
run: curl -X GET "http://$XEON5/gpu/release?id=${{ github.run_id }}&gpu=${{ env.CUDA_VISIBLE_DEVICES }}&timestamp=${{ env.STEP_TIMESTAMP }}&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}"

- name: Clean cache
if: always()
Expand Down Expand Up @@ -510,20 +512,20 @@ jobs:
echo "sha256=$sha256"
echo "SOURCE_DOWNLOADED=1" >> $GITHUB_ENV

- name: Download source from github
if: env.SOURCE_DOWNLOADED == '' && !cancelled()
uses: actions/download-artifact@v4
with:
name: source
path: dist
run-id: ${{ github.run_id }}

- name: Uncompress source
continue-on-error: true
run: |
find . -mindepth 1 ! -name "gptqmodel_source.tar.gz" -exec rm -rf {} +
ls -ahl .
tar -zxf gptqmodel_source.tar.gz
# - name: Download source from github
# if: env.SOURCE_DOWNLOADED == '' && !cancelled()
# uses: actions/download-artifact@v4
# with:
# name: source
# path: dist
# run-id: ${{ github.run_id }}

# - name: Uncompress source
# continue-on-error: true
# run: |
# find . -mindepth 1 ! -name "gptqmodel_source.tar.gz" -exec rm -rf {} +
# ls -ahl .
# tar -zxf gptqmodel_source.tar.gz

- name: Download wheel from local
continue-on-error: true
Expand Down Expand Up @@ -627,11 +629,12 @@ jobs:
timestamp=$(date +%s%3N)
gpu_id=-1

url="http://$XEON5/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }}"
echo "$url"
while [ "$gpu_id" -lt 0 ]; do
gpu_id=$(curl -s "http://$RUNNER/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }}")

gpu_id=$(curl -s "$url")
if [ "$gpu_id" -lt 0 ]; then
echo "http://$RUNNER/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }} returned $gpu_id"
echo "http://$XEON5/gpu/get?id=${{ github.run_id }}&timestamp=$timestamp&test=${{ matrix.test_script }}&runner=${RUNNER_NAME}&exclusive=${{ github.event.inputs.exclusive-gpu }} returned $gpu_id"
echo "No available GPU, waiting 5 seconds..."
curl http://$XEON5/gpu/status2
sleep 5
Expand Down Expand Up @@ -664,7 +667,7 @@ jobs:
pytest --durations=0 tests/${{ matrix.test_script }}.py || { echo "ERROR=1" >> $GITHUB_ENV; exit 1; }
execution_time=$(( $(date +%s) - start_time ))
echo "$((execution_time / 60))m $((execution_time % 60))s"
curl "http://$RUNNER/gpu/log_test_vram?id=${{ github.run_id }}&gpu=${{ env.CUDA_VISIBLE_DEVICES }}&range=$execution_time&unit=second&test=${{ matrix.test_script }}"
curl "http://$XEON5/gpu/log_test_vram?id=${{ github.run_id }}&gpu=${{ env.CUDA_VISIBLE_DEVICES }}&range=$execution_time&unit=second&test=${{ matrix.test_script }}"

- name: Release GPU
if: always() && !contains(matrix.test_script, 'ipex') && !contains(matrix.test_script, 'xpu')
Expand Down