Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Mar 29, 2024
1 parent bf0384b commit bbc251b
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 29 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/test_api_cuda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:

- name: Run tests
uses: addnab/docker-run-action@v3
env:
WORKSPACE: ${{ github.workspace }}
with:
image: pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
options: |
Expand All @@ -34,7 +32,7 @@ jobs:
--shm-size 64G
--env USE_CUDA="1"
--env PROCESS_SPECIFIC_VRAM="0"
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,timm,diffusers]
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test_api_rocm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Target devices
run: |
echo "DEVICE: $DEVICE"
echo "DEVICE=$DEVICE" >> $GITHUB_ENV
- name: Build image
run: docker build
--build-arg USER_ID=$(id -u)
Expand All @@ -39,7 +44,6 @@ jobs:
uses: addnab/docker-run-action@v3
env:
DEVICE: ${{ env.DEVICE }}
WORKSPACE: ${{ github.workspace }}
with:
image: opt-bench-rocm:${{ matrix.image.rocm_version }}
options: |
Expand All @@ -49,7 +53,7 @@ jobs:
--env USE_ROCM="1"
--device /dev/kfd
--device /dev/dri/${{ env.DEVICE }}
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,timm,diffusers]
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test_cli_cuda_onnxruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:

- name: Run tests
uses: addnab/docker-run-action@v3
env:
WORKSPACE: ${{ github.workspace }}
with:
image: pytorch/pytorch:2.2.2-cuda11.8-cudnn8-runtime
options: |
Expand All @@ -31,7 +29,7 @@ jobs:
--shm-size 64G
--env USE_CUDA="1"
--env PROCESS_SPECIFIC_VRAM="0"
--volume $WORKSPACE:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,onnxruntime-gpu,diffusers,timm] &&
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test_cli_cuda_pytorch_multi_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:

- name: Run tests
uses: addnab/docker-run-action@v3
env:
WORKSPACE: ${{ github.workspace }}
with:
image: pytorch/pytorch:2.2.2-cuda12.1-cudnn8-devel
options: |
Expand All @@ -34,7 +32,7 @@ jobs:
--shm-size 64G
--env USE_CUDA="1"
--env PROCESS_SPECIFIC_VRAM="0"
--volume $WORKSPACE:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,diffusers,timm,peft,deepspeed]
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test_cli_cuda_pytorch_single_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:

- name: Run tests
uses: addnab/docker-run-action@v3
env:
WORKSPACE: ${{ github.workspace }}
with:
image: pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
options: |
Expand All @@ -34,7 +32,7 @@ jobs:
--shm-size 64G
--env USE_CUDA="1"
--env PROCESS_SPECIFIC_VRAM="0"
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,diffusers,timm,peft,bitsandbytes,autoawq,auto-gptq]
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test_cli_cuda_tensorrt_llm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:

- name: Run tests
uses: addnab/docker-run-action@v3
env:
WORKSPACE: ${{ github.workspace }}
with:
image: huggingface/optimum-nvidia:latest
options: |
Expand All @@ -34,7 +32,7 @@ jobs:
--shm-size 64G
--env USE_CUDA="1"
--env PROCESS_SPECIFIC_VRAM="0"
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing] &&
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test_cli_cuda_torch_ort_multi_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:

- name: Run tests
uses: addnab/docker-run-action@v3
env:
WORKSPACE: ${{ github.workspace }}
with:
image: opt-bench-cuda:${{ matrix.image.cuda_version }}
options: |
Expand All @@ -45,7 +43,7 @@ jobs:
--shm-size 64G
--env USE_CUDA="1"
--env PROCESS_SPECIFIC_VRAM="0"
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,torch-ort,deepspeed,peft] &&
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test_cli_cuda_torch_ort_single_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:

- name: Run tests
uses: addnab/docker-run-action@v3
env:
WORKSPACE: ${{ github.workspace }}
with:
image: opt-bench-cuda:${{ matrix.image.cuda_version }}
options: |
Expand All @@ -45,7 +43,7 @@ jobs:
--shm-size 64G
--env USE_CUDA="1"
--env PROCESS_SPECIFIC_VRAM="0"
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,torch-ort,peft] &&
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test_cli_rocm_pytorch_multi_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Target devices
run: |
echo "DEVICE0: $DEVICE0"
echo "DEVICE1: $DEVICE1"
echo "DEVICE0=$DEVICE0" >> $GITHUB_ENV
echo "DEVICE1=$DEVICE1" >> $GITHUB_ENV
- name: Build image
run: docker build
--build-arg USER_ID=$(id -u)
Expand All @@ -40,7 +47,6 @@ jobs:
env:
DEVICE0: ${{ env.DEVICE0 }}
DEVICE1: ${{ env.DEVICE1 }}
WORKSPACE: ${{ github.workspace }}
with:
image: opt-bench-rocm:${{ matrix.image.rocm_version }}
options: |
Expand All @@ -51,8 +57,8 @@ jobs:
--device /dev/kfd
--device /dev/dri/${{ env.DEVICE0 }}
--device /dev/dri/${{ env.DEVICE1 }}
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,diffusers,timm,deepspeed,peft,autoawq-rocm,auto-gptq-rocm]
pytest -x -s -k 'cli and rocm and pytorch and (dp or ddp or device_map or deepspeed)'
pytest -x -s -k 'cli and cuda and pytorch and (dp or ddp or device_map or deepspeed)'
12 changes: 9 additions & 3 deletions .github/workflows/test_cli_rocm_pytorch_single_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Target devices
run: |
echo "DEVICE0: $DEVICE0"
echo "DEVICE1: $DEVICE1"
echo "DEVICE0=$DEVICE0" >> $GITHUB_ENV
echo "DEVICE1=$DEVICE1" >> $GITHUB_ENV
- name: Build image
run: docker build
--build-arg USER_ID=$(id -u)
Expand All @@ -39,7 +46,6 @@ jobs:
uses: addnab/docker-run-action@v3
env:
DEVICE: ${{ env.DEVICE }}
WORKSPACE: ${{ github.workspace }}
with:
image: opt-bench-rocm:${{ matrix.image.rocm_version }}
options: |
Expand All @@ -49,8 +55,8 @@ jobs:
--env USE_ROCM="1"
--device /dev/kfd
--device /dev/dri/${{ env.DEVICE }}
--volume ${{ env.WORKSPACE }}:/workspace
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,diffusers,timm,peft,autoawq-rocm,auto-gptq-rocm]
pytest -x -s -k "cli and rocm and pytorch and not (dp or ddp or device_map or deepspeed) and not (bnb or awq or torch_compile)"
pytest -x -s -k "cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed) and not (bnb or awq or torch_compile)"

0 comments on commit bbc251b

Please sign in to comment.