diff --git a/.github/workflows/rocm-mi300.yml b/.github/workflows/rocm-mi300.yml new file mode 100644 index 000000000000..7ba0920901ea --- /dev/null +++ b/.github/workflows/rocm-mi300.yml @@ -0,0 +1,58 @@ +name: rocm-mi300 + +on: + push: + branches: + - main + workflow_dispatch: + schedule: + - cron: 29 8 * * * # about 1:29am PDT + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }} + cancel-in-progress: true + +permissions: read-all + +jobs: + target-determination: + if: github.repository_owner == 'pytorch' + name: before-test + uses: ./.github/workflows/target_determination.yml + permissions: + id-token: write + contents: read + + linux-focal-rocm6_3-py3_10-build: + if: ${{ (github.event_name != 'schedule' || github.repository == 'pytorch/pytorch') && github.repository_owner == 'pytorch' }} + name: linux-focal-rocm6.3-py3.10 + uses: ./.github/workflows/_linux-build.yml + with: + build-environment: linux-focal-rocm6.3-py3.10 + docker-image-name: pytorch-linux-focal-rocm-n-py3 + sync-tag: rocm-build + test-matrix: | + { include: [ + { config: "default", shard: 1, num_shards: 6, runner: "linux.rocm.gpu.mi300.2" }, + { config: "default", shard: 2, num_shards: 6, runner: "linux.rocm.gpu.mi300.2" }, + { config: "default", shard: 3, num_shards: 6, runner: "linux.rocm.gpu.mi300.2" }, + { config: "default", shard: 4, num_shards: 6, runner: "linux.rocm.gpu.mi300.2" }, + { config: "default", shard: 5, num_shards: 6, runner: "linux.rocm.gpu.mi300.2" }, + { config: "default", shard: 6, num_shards: 6, runner: "linux.rocm.gpu.mi300.2" }, + ]} + secrets: inherit + + linux-focal-rocm6_3-py3_10-test: + permissions: + id-token: write + contents: read + name: linux-focal-rocm6.3-py3.10 + uses: ./.github/workflows/_rocm-test.yml + needs: + - linux-focal-rocm6_3-py3_10-build + - target-determination + with: + build-environment: linux-focal-rocm6.3-py3.10 + docker-image: ${{ needs.linux-focal-rocm6_3-py3_10-build.outputs.docker-image }} + test-matrix: ${{ needs.linux-focal-rocm6_3-py3_10-build.outputs.test-matrix }} + secrets: inherit diff --git a/.github/workflows/rocm.yml b/.github/workflows/rocm.yml index 16b00b671cb5..6ff8667a9d94 100644 --- a/.github/workflows/rocm.yml +++ b/.github/workflows/rocm.yml @@ -36,12 +36,12 @@ jobs: sync-tag: rocm-build test-matrix: | { include: [ - { config: "default", shard: 1, num_shards: 6, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, - { config: "default", shard: 2, num_shards: 6, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, - { config: "default", shard: 3, num_shards: 6, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, - { config: "default", shard: 4, num_shards: 6, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, - { config: "default", shard: 5, num_shards: 6, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, - { config: "default", shard: 6, num_shards: 6, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, + { config: "default", shard: 1, num_shards: 6, runner: "linux.rocm.gpu.2" }, + { config: "default", shard: 2, num_shards: 6, runner: "linux.rocm.gpu.2" }, + { config: "default", shard: 3, num_shards: 6, runner: "linux.rocm.gpu.2" }, + { config: "default", shard: 4, num_shards: 6, runner: "linux.rocm.gpu.2" }, + { config: "default", shard: 5, num_shards: 6, runner: "linux.rocm.gpu.2" }, + { config: "default", shard: 6, num_shards: 6, runner: "linux.rocm.gpu.2" }, ]} secrets: inherit diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index b52b6753b748..d23d3c2b8753 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -175,9 +175,9 @@ jobs: sync-tag: rocm-build test-matrix: | { include: [ - { config: "default", shard: 1, num_shards: 2, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, - { config: "default", shard: 2, num_shards: 2, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.2' || 'linux.rocm.gpu.2' }}" }, - { config: "distributed", shard: 1, num_shards: 1, runner: "${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 'linux.rocm.gpu.mi300.4' || 'linux.rocm.gpu.4' }}" }, + { config: "default", shard: 1, num_shards: 2, runner: "linux.rocm.gpu.2" }, + { config: "default", shard: 2, num_shards: 2, runner: "linux.rocm.gpu.2" }, + { config: "distributed", shard: 1, num_shards: 1, runner: "linux.rocm.gpu.4" }, ]} secrets: inherit