Skip to content

Gpu ci check v2 #29174

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

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ca51b9c
Initial GPU CI setup
betatim May 29, 2024
1b06c5b
Give the workflow a name
betatim May 29, 2024
2bc3987
Execute workflow also on pull requests
betatim May 29, 2024
b376491
Look around
betatim May 29, 2024
0421a38
Mamba solver is already configured
betatim May 29, 2024
169a707
Conda permissions
betatim May 29, 2024
4736792
sudo make me a sandwich
betatim May 29, 2024
c66620e
sudo chown
betatim May 29, 2024
8397056
miniforge
betatim May 29, 2024
b30d217
miniforge
betatim May 29, 2024
56d4472
miniforge
betatim May 29, 2024
9b07c31
miniforge
betatim May 29, 2024
a6de469
miniforge
betatim May 29, 2024
1d9f1df
miniforge
betatim May 29, 2024
4dd748e
Use a dedicated env/lock file for array API
betatim May 29, 2024
bb7bfcd
Use inputs
betatim May 30, 2024
6f1832f
Fix cupy version
betatim May 30, 2024
f27d848
Use a cache for the conda environment
betatim May 30, 2024
d710236
Update path
betatim May 30, 2024
618fb38
Test the cache
betatim May 30, 2024
468a6c3
Enable build parallelism
betatim May 30, 2024
a6ef0a1
Restrict permissions of the GitHub token
betatim May 31, 2024
b409225
Remove unused build parallelism env var
betatim May 31, 2024
fe07d86
Set a meaningful tag
betatim May 31, 2024
08fcecb
Configure automatic lockfile update
betatim May 31, 2024
5e7b0da
Rename workflow job
betatim Jun 3, 2024
43b8537
Remove package constraints
betatim Jun 3, 2024
4d5b7c7
Merge branch 'main' into betatim/gpu-ci
betatim Jun 3, 2024
d19551d
Remove "pull_request" trigger
betatim Jun 3, 2024
830cca7
Check
scikit-learn-bot Jun 3, 2024
89f4b6d
Check
scikit-learn-bot Jun 3, 2024
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
66 changes: 66 additions & 0 deletions .github/workflows/cuda-gpu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CUDA GPU
on:
workflow_dispatch:
inputs:
pr_id:
description: Test the contents of this Pull Request
required: true

pull_request:

permissions: read-all

jobs:
tests:
runs-on: GPU
name: Run Array API unit tests
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.12'
# change this to checkout a particular PR if a PR number is provided as input
- name: Checkout main repository
uses: actions/checkout@v2
- name: Checkout a particular Pull Request
if: inputs.pr_id
env:
PR_ID: ${{ inputs.pr_id }}
GH_TOKEN: ${{ github.token }}
run: |
echo "Checking out" ${{ env.PR_ID }}
echo "hello-world"
gh pr checkout ${{ env.PR_ID }}
- name: Cache conda environment
id: cache-conda
uses: actions/cache@v3
env:
cache-name: cache-conda-env
with:
path: ~/conda
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('build_tools/github/pylatest_conda_forge_mkl_array-api_linux-64_conda.lock') }}
- name: Install miniforge
if: ${{ steps.cache-conda.outputs.cache-hit != 'true' }}
run: |
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh -b -p "${HOME}/conda"
source "${HOME}/conda/etc/profile.d/conda.sh"
rm Miniforge3-$(uname)-$(uname -m).sh
- name: Install dependencies
if: ${{ steps.cache-conda.outputs.cache-hit != 'true' }}
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
# defines the get_dep and show_installed_libraries functions
source build_tools/shared.sh
conda activate base
conda install -c conda-forge "$(get_dep conda-lock min)" -y
conda-lock install --name sklearn build_tools/github/pylatest_conda_forge_mkl_array-api_linux-64_conda.lock
- name: Install scikit-learn
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate sklearn
pip install --verbose --no-build-isolation --config-settings editable-verbose=true --editable .
- name: Run array API tests
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate sklearn
pytest -k 'array_api'
2 changes: 2 additions & 0 deletions .github/workflows/update-lock-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- name: cirrus-arm
update_script_args: "--select-tag arm"
additional_commit_message: "[cirrus arm]"
- name: array API
update_scrupt_args: "--select-tag gpu"

steps:
- uses: actions/checkout@v4
Expand Down
Loading
Loading