Skip to content

Commit

Permalink
Added tests in Gaudi2 CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
vshekhawat-hlab committed Mar 14, 2024
1 parent b112c99 commit faea5c1
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/hpu-gaudi2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ jobs:
- 80
options: --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice

env:
PT_HPU_LAZY_MODE: 0
TEST_LIST: |
test_accelerator.py
test_autotuning.py
test_compression.py
test_dist.py
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -38,6 +46,13 @@ jobs:
python -c "import torch; print('torch:', torch.__version__, torch)"
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
- name: Install transformers
run: |
git clone https://github.com/huggingface/transformers
cd transformers
git rev-parse --short HEAD
pip install .
- name: Install deepspeed
run: |
pip install .[dev]
Expand All @@ -46,3 +61,25 @@ jobs:
- name: Python environment
run: |
pip list
- name: Set up test list
run: |
# Convert multiline TEST_LIST to an array
IFS=$'\n' read -r -d '' -a tests <<< "$TEST_LIST"
# Construct the test list with 'or' operator
for test in "${tests[@]}"; do
TEST_STRING+="$test or "
done;
# Remove the trailing 'or' and leading/trailing whitespace
TEST_LIST=${TEST_STRING% or }
TEST_LIST=${TEST_LIST# }
- name: Unit tests
run: |
unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
cd tests
env
echo ${TEST_LIST}
echo ${PT_HPU_LAZY_MODE}

0 comments on commit faea5c1

Please sign in to comment.