Skip to content

Commit

Permalink
legate-raft initial commit
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Adorf <[email protected]>
Co-authored-by: Corey J. Nolet <[email protected]>
Co-authored-by: Sebastian Berg <[email protected]>
Co-authored-by: Mads R. B. Kristensen <[email protected]>
Co-authored-by: viclafargue <[email protected]>
Co-authored-by: Corey Nolet <[email protected]>
Co-authored-by: Victor Lafargue <[email protected]>
Co-authored-by: Sebastian Berg <[email protected]>
Co-authored-by: Ben Jarmak <[email protected]>
Co-authored-by: James Lamb <[email protected]>
Co-authored-by: Mike McCarty <[email protected]>
  • Loading branch information
11 people committed Nov 22, 2024
0 parents commit 4f0afc1
Show file tree
Hide file tree
Showing 142 changed files with 12,520 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.code-workspace
*.ipynb
.VSCodeCounter/*
.dockerignore
.vscode/*
cpp/build/
legate_prof*/
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Running clang-format on all files (and small other auto-formatting)
f47418844aa6ae6c0c8b6dcb9e0f4a594e8e175d
4 changes: 4 additions & 0 deletions .github/copy-pr-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Configuration file for `copy-pr-bot` GitHub App
# https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/

enabled: true
43 changes: 43 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: build

concurrency:
group: ci-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true

on:
# run on pushes to certain branches
push:
branches:
- "main"
- "release/v[0-9][0-9].[0-9][0-9].[0-9][0-9]"
# run on pushes of any tags
tags:
- "*"
# run by clicking buttons in the GitHub Actions UI
workflow_dispatch:
inputs:
deploy-docs:
description: 'Update the docs site?'
required: true
type: boolean

jobs:
conda-python-build:
uses: ./.github/workflows/conda-python-build.yaml
with:
script: "ci/build_python.sh"
secrets: inherit
upload-conda:
needs:
- conda-python-build
uses: ./.github/workflows/conda-upload-packages.yaml
secrets: inherit
docs-build:
needs:
- conda-python-build
uses: ./.github/workflows/docs-build.yaml
with:
script: "ci/build_docs.sh"
# only deploy docs on tag pushes or when someone manually runs the workflow with "update docs" selected
deploy: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch' && inputs.deploy-docs == true) }}
secrets: inherit
62 changes: 62 additions & 0 deletions .github/workflows/conda-python-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: conda-python-build

concurrency:
group: conda-python-build-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true

on:
# run only when called by other workflows
workflow_call:
inputs:
script:
required: true
type: string
description: "relative path to a script that builds conda packages"

env:
# CUDA architectures to build for
CUDAARCHS: "RAPIDS"
# where conda-build puts files it creates
RAPIDS_CONDA_BLD_OUTPUT_DIR: /tmp/conda-bld-output
# where jobs that download conda packages store the local channel
RAPIDS_LOCAL_CONDA_CHANNEL: /tmp/local-conda-packages

jobs:

build:
strategy:
fail-fast: false
# available legate and cunumeric packages:
#
# * https://anaconda.org/legate/legate
# * https://anaconda.org/legate/cunumeric
#
# Valid set of RAPIDS ci-conda image tags:
#
# * https://hub.docker.com/r/rapidsai/ci-conda/tags
matrix:
ARCH:
- "amd64"
CUDA_VER:
- "12.5.1"
PY_VER:
- "3.10"
- "3.11"
# - "3.12" requires update to RAPIDS 24.10
runs-on: linux-${{ matrix.ARCH }}-cpu4
container:
image: "rapidsai/ci-conda:cuda${{ matrix.CUDA_VER }}-ubuntu22.04-py${{ matrix.PY_VER }}"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# the notebooks and PNG files stored in git LFS aren't necessary for package-building
lfs: false
- name: build
run: "${{ inputs.script }}"
- name: upload
uses: actions/upload-artifact@v4
with:
name: legate-raft-conda-cuda${{ matrix.CUDA_VER }}-${{ matrix.ARCH }}-py${{ matrix.PY_VER }}
path: ${{ env.RAPIDS_CONDA_BLD_OUTPUT_DIR }}
if-no-files-found: error
37 changes: 37 additions & 0 deletions .github/workflows/conda-upload-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# adopted from https://github.com/rapidsai/shared-workflows/blob/branch-24.12/.github/workflows/conda-upload-packages.yaml
# with some notable differences:
#
# * assumes packages were uploaded to GitHub artifact store, not Amazon S3
# * always publishes to the same channel, but uses different label for non-release packages
#

on:
# run only when called by other workflows
workflow_call:

env:
# where jobs that download conda packages store the local channel
RAPIDS_LOCAL_CONDA_CHANNEL: /tmp/local-conda-packages

jobs:
upload:
runs-on: linux-amd64-cpu4
container:
image: rapidsai/ci-conda:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: download conda packages
uses: actions/download-artifact@v4
with:
# omitting 'name' here means "download all artifacts from this run"... useful to
# avoid having to list the matrix of CUDA / Python versions here
path: ${{ env.RAPIDS_LOCAL_CONDA_CHANNEL }}
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
run-id: ${{ github.run_id }}
- name: Upload packages
run: "ci/upload-to-anaconda.sh"
env:
CONDA_LEGATE_TOKEN: ${{ secrets.CONDA_LEGATE_TOKEN }}
76 changes: 76 additions & 0 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: docs-build

concurrency:
group: docs-build-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true

on:
# run only when called by other workflows
workflow_call:
inputs:
deploy:
required: true
type: boolean
default: false
description: "set to true to publish docs"
script:
required: true
type: string
description: "relative path to a script that builds conda packages"

env:
# where jobs that download conda packages store the local channel
RAPIDS_LOCAL_CONDA_CHANNEL: /tmp/local-conda-packages

jobs:

build:
strategy:
matrix:
include:
- ARCH: amd64
CUDA_VER: "12.5.1"
PY_VER: "3.11"
runs-on: linux-${{ matrix.ARCH }}-gpu-v100-latest-1
container:
image: "rapidsai/ci-conda:cuda${{ matrix.CUDA_VER }}-ubuntu22.04-py${{ matrix.PY_VER }}"
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: download conda packages
uses: actions/download-artifact@v4
with:
name: legate-raft-conda-cuda${{ matrix.CUDA_VER }}-${{ matrix.ARCH }}-py${{ matrix.PY_VER }}
path: ${{ env.RAPIDS_LOCAL_CONDA_CHANNEL }}
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
run-id: ${{ github.run_id }}
- name: build docs
run: "${{ inputs.script }}"
- uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html

deploy:
needs:
- build
if: inputs.deploy

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
91 changes: 91 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: pr

concurrency:
group: ci-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true

on:
# run on pushes to certain branches
push:
branches:
- "pull-request/[0-9]+"

env:
# CUDA architectures to build for
CUDAARCHS: "RAPIDS"
# where jobs that download conda packages store the local channel
RAPIDS_LOCAL_CONDA_CHANNEL: /tmp/local-conda-packages

jobs:

# group together all jobs that must pass for a PR to be merged
# (for use by branch protections)
pr-builder:
needs:
- pre-commit
- conda-python-build
- conda-python-tests
- docs-build
uses: rapidsai/shared-workflows/.github/workflows/[email protected]

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/[email protected]

conda-python-build:
needs:
- pre-commit
uses: ./.github/workflows/conda-python-build.yaml
with:
script: "ci/build_python.sh"
secrets: inherit

conda-python-tests:
needs:
- pre-commit
- conda-python-build
strategy:
fail-fast: false
# As of the last time this was updated, legate / cunumeric packages were published for only:
#
# * architectures: amd64 only
# * CUDA: >=12.2
# * Python: 3.10, 3.11, 3.12
#
# Valid set of RAPIDS ci-conda image tags: https://hub.docker.com/r/rapidsai/ci-conda/tags
matrix:
include:
- ARCH: "amd64"
CUDA_VER: "12.5.1"
PY_VER: "3.10"
runs-on: linux-${{ matrix.ARCH }}-gpu-v100-latest-1
container:
image: "rapidsai/ci-conda:cuda${{ matrix.CUDA_VER }}-ubuntu22.04-py${{ matrix.PY_VER }}"
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: download conda packages
uses: actions/download-artifact@v4
with:
name: legate-raft-conda-cuda${{ matrix.CUDA_VER }}-${{ matrix.ARCH }}-py${{ matrix.PY_VER }}
path: ${{ env.RAPIDS_LOCAL_CONDA_CHANNEL }}
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
run-id: ${{ github.run_id }}
- name: test
run: |
ci/test_python.sh
docs-build:
needs:
- conda-python-build
uses: ./.github/workflows/docs-build.yaml
with:
script: "ci/build_docs.sh"
deploy: false
secrets: inherit
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*.csv
*.db
*.png
.eggs/
.hypothesis/
.idea
__pycache__/
_skbuild/
build/
cpp/src/legate_library.h.eggs/
dist/
legate_raft.egg-info/
legate_raft/__pycache__/
legate_raft/install_info.py
legate_prof*
pytest/__pycache__
_deps/
.vscode
Loading

0 comments on commit 4f0afc1

Please sign in to comment.