Files
pytorch/.github/workflows/build-magma-linux.yml
Ting Lu b6852778ff Add Magma build for CUDA 13.0 (#160770)
Add magma build for CUDA 13.0 after almalinux docker is available

https://github.com/pytorch/pytorch/issues/159779
Pull Request resolved: https://github.com/pytorch/pytorch/pull/160770
Approved by: https://github.com/atalman

Co-authored-by: Andrey Talman <atalman@fb.com>
Co-authored-by: Wei Wang <weiwan@nvidia.com>
2025-08-19 01:10:00 +00:00

70 lines
2.2 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: ["130", "129", "128", "126"]
steps:
- name: Checkout PyTorch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
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@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
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