Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use process_retry on amd-smi #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions .github/workflows/transformers_amd_ci_scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
options: --device /dev/kfd --device /dev/dri --env ROCR_VISIBLE_DEVICES --env HIP_VISIBLE_DEVICES --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
steps:
- name: AMD-SMI
run: amd-smi list
run: python3 utils/process_retry.py 'amd-smi list'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to update the repository before running this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to update this one before merge.


- name: ROCM-INFO
run: rocminfo | grep "Agent" -A 14
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
echo "slice_ids=$(python3 -c 'd = list(range(${{ env.NUM_SLICES }})); print(d)')" >> $GITHUB_OUTPUT

- name: AMD-SMI
run: amd-smi list
run: python3 utils/process_retry.py 'amd-smi list'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like this one being after name: Update clone


- name: ROCM-INFO
run: rocminfo | grep "Agent" -A 14
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
run: python3 -m pip uninstall -y transformers && python3 -m pip install -e .

- name: AMD-SMI
run: amd-smi list
run: python3 utils/process_retry.py 'amd-smi list'

- name: ROCM-INFO
run: rocminfo | grep "Agent" -A 14
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
run: python3 -m pip uninstall -y transformers && python3 -m pip install -e .

- name: AMD-SMI
run: amd-smi list
run: python3 utils/process_retry.py 'amd-smi list'

- name: ROCM-INFO
run: rocminfo | grep "Agent" -A 14
Expand Down Expand Up @@ -304,7 +304,7 @@ jobs:
run: python3 -m pip uninstall -y transformers && python3 -m pip install -e .

- name: AMD-SMI
run: amd-smi list
run: python3 utils/process_retry.py 'amd-smi list'

- name: ROCM-INFO
run: rocminfo | grep "Agent" -A 14
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/transformers_amd_model_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ jobs:
run_models_gpu:
name: " "
strategy:
max-parallel: 1 # For now, not to parallelize. Can change later if it works well.
max-parallel: 1 # For now, not to parallelize. Can change later if it works well.
fail-fast: false
matrix:
folders: ${{ fromJson(inputs.folder_slices)[inputs.slice_id] }}
runs-on: ['${{ inputs.machine_type }}', self-hosted, amd-gpu, '${{ inputs.runner }}']
runs-on:
[
"${{ inputs.machine_type }}",
self-hosted,
amd-gpu,
"${{ inputs.runner }}",
]
container:
image: ${{ inputs.docker }}
options: --device /dev/kfd --device /dev/dri --env ROCR_VISIBLE_DEVICES --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
Expand Down Expand Up @@ -75,31 +81,26 @@ jobs:
- name: Update / Install some packages (for Past CI)
if: ${{ contains(inputs.docker, '-past-') }}
working-directory: /transformers
run: |
python3 -m pip install -U datasets
run: python3 -m pip install -U datasets

- name: Update / Install some packages (for Past CI)
if: ${{ contains(inputs.docker, '-past-') && contains(inputs.docker, '-pytorch-') }}
working-directory: /transformers
run: |
python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
run: python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate

- name: ROCM-SMI
run: |
rocm-smi
- name: AMD-SMI
run: python3 utils/process_retry.py 'amd-smi list'

- name: ROCM-INFO
run: |
rocminfo | grep "Agent" -A 14
run: rocminfo | grep "Agent" -A 14

- name: Show ROCR environment
run: |
echo "ROCR: $ROCR_VISIBLE_DEVICES"

- name: Environment
working-directory: /transformers
run: |
python3 utils/print_env.py
run: python3 utils/print_env.py

- name: Show installed libraries and their versions
working-directory: /transformers
Expand Down Expand Up @@ -127,4 +128,3 @@ jobs:
with:
name: ${{ inputs.machine_type }}_run_models_gpu_${{ env.matrix_folders }}_test_reports
path: /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports