-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow for test that requires pytorch CUDA.
- Loading branch information
1 parent
aeed89e
commit 3989e0c
Showing
4 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: build-cuda-plugin | ||
on: | ||
workflow_call: | ||
inputs: | ||
dev-image: | ||
required: true | ||
type: string | ||
description: Base image for builds | ||
runner: | ||
required: false | ||
type: string | ||
description: Runner type for the test | ||
default: linux.12xlarge | ||
|
||
secrets: | ||
gcloud-service-key: | ||
required: true | ||
description: Secret to access Bazel build cache | ||
jobs: | ||
build: | ||
runs-on: ${{ inputs.runner }} | ||
container: | ||
image: ${{ inputs.dev-image }} | ||
env: | ||
GCLOUD_SERVICE_KEY: ${{ secrets.gcloud-service-key }} | ||
GOOGLE_APPLICATION_CREDENTIALS: /tmp/default_credentials.json | ||
BAZEL_JOBS: 16 | ||
BAZEL_REMOTE_CACHE: 1 | ||
BUILD_CPP_TESTS: 1 | ||
steps: | ||
- name: Setup gcloud | ||
shell: bash | ||
run: | | ||
echo "${GCLOUD_SERVICE_KEY}" > $GOOGLE_APPLICATION_CREDENTIALS | ||
- name: Checkout PyTorch Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: pytorch/pytorch | ||
path: pytorch | ||
submodules: recursive | ||
- name: Checkout PyTorch/XLA Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: pytorch/xla | ||
- name: Build | ||
shell: bash | ||
run: | | ||
cd pytorch/xla/infra/ansible | ||
ansible-playbook playbook.yaml -vvv -e "stage=build arch=amd64 accelerator=cuda cuda_compute_capabilities=5.2,7.5 src_root=${GITHUB_WORKSPACE} build_cpp_tests=1 git_versioned_xla_build=1 cache_suffix=-ci build_pytorch_with_cuda=1" --skip-tags=fetch_srcs,install_deps | ||
- name: Upload wheel | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: torch-xla-wheels | ||
path: /dist/*.whl | ||
- name: Upload CPP test binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cpp-test-bin | ||
path: /tmp/test/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters