[workflow] adjust the GPU memory threshold for scheduled unit test (#2558)

* [workflow] adjust the GPU memory threshold for scheduled unit test

* polish code
pull/2585/head
Frank Lee 2023-02-06 13:47:25 +08:00 committed by GitHub
parent ba47517342
commit 76edb04b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
name: Build
name: Build on PR
on:
pull_request:

View File

@ -1,4 +1,4 @@
name: Build on 8 GPUs
name: Build on Schedule
on:
schedule:
@ -39,7 +39,7 @@ jobs:
- name: Unit Testing
run: |
gpu_used=$(nvidia-smi -i 0 --query-gpu=memory.used --format=csv,noheader,nounits)
[ "$gpu_used" -le "100" ] && PYTHONPATH=$PWD pytest tests
[ "$gpu_used" -le "10000" ] && PYTHONPATH=$PWD pytest tests
env:
DATA: /data/scratch/cifar-10
LD_LIBRARY_PATH: /github/home/.tensornvme/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64