-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Skip CPU-only tests on CircleCI machines with GPU #4002
Conversation
This seems to be working as expected, see e.g. the linux gpu unittest workfow where the The tests aren't properly skipped on Windows because of #4006, but we can merge this anyway. Note: There are still a lot of CPU-only tests that are run on the GPU CI. These are all the tests in tests files like |
.circleci/config.yml.in
Outdated
- 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 -e CIRCLECI -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh | ||
command: docker run --env-file ./env.list --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous -e CIRCLECI
was actually enough for what we need here, but I feel like creating the file is more future proof (we might need more env variables in the future) and most importantly it allows to properly document why we need this, which can be useful if we start using docker for more than just linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
With this PR we seem to have saved ~3min from the GPU CI, nice!
@NicolasHug On unittest_windows_gpu_py3.8, I see cuda tests being skipped. Example:
Is this related to the temporary CicleCI driver issue for win GPU? |
Reviewed By: fmassa Differential Revision: D29097716 fbshipit-source-id: c4247acaf9f6c8b87eba4479e212891befb3efc8
This PR makes the CircleCI machines with GPU skip the tests that don't actually need a GPU. These tests are already extensively tested in the other CPU-only workflows.