mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Now that manylinux 2.28 is available with cuda 1.26 https://github.com/pytorch/pytorch/pull/139909 we can build the magma tarball for cuda 1.26. Fixes #139397 Pull Request resolved: https://github.com/pytorch/pytorch/pull/140143 Approved by: https://github.com/atalman
69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
name: build-linux-magma
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
main
|
|
paths:
|
|
- .ci/magma/*
|
|
- .ci/magma/package_files/*
|
|
- .github/workflows/build-magma-linux.yml
|
|
pull_request:
|
|
paths:
|
|
- .ci/magma/*
|
|
- .ci/magma/package_files/*
|
|
- .github/workflows/build-magma-linux.yml
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -x -e -l {0}
|
|
env:
|
|
BUILD_ENVIRONMENT: build-linux-magma
|
|
IN_CI: 1
|
|
IS_GHA: 1
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-linux-magma:
|
|
if: github.repository_owner == 'pytorch'
|
|
runs-on: linux.2xlarge
|
|
permissions:
|
|
id-token: write
|
|
strategy:
|
|
matrix:
|
|
cuda_version: ["126", "124", "121", "118"] # There is no pytorch/manylinux-cuda126 yet
|
|
steps:
|
|
- name: Checkout PyTorch
|
|
uses: actions/checkout@v4
|
|
- name: Build Magma Cuda
|
|
working-directory: .ci/magma
|
|
run: |
|
|
# Produces artifacts under magma/output/linux-64/magma-cuda*.bz2
|
|
make magma-cuda${{ matrix.cuda_version }}
|
|
- name: Save as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: .ci/magma/output/linux-64/magma-cuda*.bz2
|
|
name: artifact_${{ matrix.cuda_version }}
|
|
- name: Configure AWS credentials(PyTorch account)
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
|
uses: aws-actions/configure-aws-credentials@v3
|
|
with:
|
|
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_s3_ossci_linux_windows_read_write
|
|
aws-region: us-east-1
|
|
- name: Set DRY_RUN
|
|
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
|
|
run: |
|
|
echo "DRY_RUN=disabled" >> "$GITHUB_ENV"
|
|
- name: Upload binaries
|
|
shell: bash
|
|
env:
|
|
PKG_DIR: ".ci/magma/output/linux-64/"
|
|
TARGET_OS: "linux"
|
|
PKG_INCLUDE: "magma-cuda*.tar.bz2"
|
|
run: |
|
|
set -ex
|
|
bash .github/scripts/upload_aws_ossci.sh
|