Skip to content

Commit

Permalink
[fbsync] remove Linux GPU unittest from CircleCI (#7354)
Browse files Browse the repository at this point in the history
Reviewed By: vmoens

Differential Revision: D44416634

fbshipit-source-id: 3646166c5334aee6bbe3a7695183a9c371922a73
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Mar 30, 2023
1 parent cfef168 commit 89b5a09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 205 deletions.
112 changes: 0 additions & 112 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 0 additions & 90 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -722,96 +722,6 @@ jobs:
conda activate python${PYTHON_VERSION}
python -c "import torchvision"

unittest_linux_cpu:
<<: *binary_common
docker:
- image: "pytorch/manylinux-cpu"
resource_class: 2xlarge+
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
- restore_cache:
{% raw %}
keys:
- env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
- run:
name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:
{% raw %}
key: env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
paths:
- conda
- env
- run:
name: Install torchvision
command: .circleci/unittest/linux/scripts/install.sh
- run:
name: Run tests
command: .circleci/unittest/linux/scripts/run_test.sh
- run:
name: Post process
command: .circleci/unittest/linux/scripts/post_process.sh
- store_test_results:
path: test-results

unittest_linux_gpu:
<<: *binary_common
machine:
image: ubuntu-2004-cuda-11.4:202110-01
resource_class: gpu.nvidia.medium
environment:
image_name: "pytorch/manylinux-cuda117"
CU_VERSION: << parameters.cu_version >>
PYTHON_VERSION: << parameters.python_version >>
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
- restore_cache:
{% raw %}
keys:
- env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
- run:
name: Setup
command: docker run -e PYTHON_VERSION -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:
{% raw %}
key: env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
paths:
- conda
- env
- run:
# Here we create an envlist file that contains some env variables that we want the docker container to be aware of.
# Normally, the CIRCLECI variable is set and available on all CI workflows: https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables.
# They're avaiable in all the other workflows (OSX and Windows).
# But here, we're running the unittest_linux_gpu workflows in a docker container, where those variables aren't accessible.
# So instead we dump the variables we need in env.list and we pass that file when invoking "docker run".
name: export CIRCLECI env var
command: echo "CIRCLECI=true" >> ./env.list
- run:
name: Install torchvision
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL -e CU_VERSION "${image_name}" .circleci/unittest/linux/scripts/install.sh
- run:
name: Run tests
command: docker run --env-file ./env.list -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh
- run:
name: Post Process
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/post_process.sh
- store_test_results:
path: test-results

unittest_windows_cpu:
<<: *binary_common
executor:
Expand Down
5 changes: 2 additions & 3 deletions .circleci/regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,11 @@ def indent(indentation, data_list):

def unittest_workflows(indentation=6):
jobs = []
for os_type in ["linux", "windows", "macos"]:
for os_type in ["windows", "macos"]:
for device_type in ["cpu", "gpu"]:
if os_type == "macos" and device_type == "gpu":
continue
if os_type == "linux" and device_type == "cpu":
continue

for i, python_version in enumerate(PYTHON_VERSIONS):

# Turn off unit tests for 3.11, unit test are not setup properly
Expand Down

0 comments on commit 89b5a09

Please sign in to comment.