Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

Add basic Rocm CI build and test - #1231

Closed
scotts wants to merge 35 commits into
pytorch:mainfrom
scotts:ci_rocm
Closed

scotts wants to merge 35 commits into
pytorch:mainfrom
scotts:ci_rocm

Conversation

@scotts

@scotts scotts commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Depends on #1222.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@meta-codesync

meta-codesync Bot commented Jan 22, 2026

Copy link
Copy Markdown

@scotts has imported this pull request. If you are a Meta employee, you can view this in D91166410.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

Comment thread .github/workflows/linux_rocm.yml Outdated

jobs:
pr-test:
runs-on: linux.rocm.gpu.gfx942

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be linux.rocm.gpu.gfx942.1 if you want a single-GPU runner

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jithunnair-amd, will that enable the job to run? It hasn't been successfully scheduled yet.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@scotts

scotts commented Jan 27, 2026

Copy link
Copy Markdown
Contributor Author

@jithunnair-amd, my workflow is now running, but I haven't been able to successfully pull a ROCm image. Can you advise me on what image to pull and through what mechanisms?

Comment thread .github/workflows/linux_rocm.yml Outdated

# This is the docker image that pytorch/pytorch uses for ROCM CI.
env:
DOCKER_IMAGE: "ghcr.io/pytorch/ci-image:pytorch-linux-noble-rocm-n-py3"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scotts If we want to use the same image that's used by PyTorch CI for ROCm, there's a sha suffix that is also part of the tag e.g. pytorch-linux-noble-rocm-n-py3-f2bf68fc1a48c33b01facc4b2e0227aa3da827e0. However, this is ever-changing, and is not maintainable. Alternatives:

  1. Work with @atalman to update the publishing workflow, so that every time it pushes out a new image for pytorch-linux-noble-rocm-n-py3-* tag, it also publishes it as pytorch-linux-noble-rocm-n-py3-latest tag or something.
  2. Use a different image such as pytorch/manylinux2_28-builder:rocm7.2, which will still be a maintenance burden to update the ROCm versions, but with less frequency than the SHA updates in the CI image. That part can again be addressed by automatically publishing the same image with a tag pytorch/manylinux2_28-builder:rocm-latest. Also, this image usually updates ROCm version before the CI image, so you might have potential days of mismatch in the ROCm version between pytorch CI and kineto CI, if that matters.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jithunnair-amd, thanks for taking a look!

Since my short-term goal is to just get some tests up and running to check regressions, I'm happy doing the easiest thing for now. I tried pulling pytorch/manylinux2_28-builder:rocm7.2, but I'm getting these failures: https://github.com/pytorch/kineto/actions/runs/21452690799/job/61785302020?pr=1231

It looks like I don't have permissions. Is this because this is running in pytorch/kineto and not pytorch/pytorch? There's also some aws: command not found errors, but these same patterns work fine for the CPU and CUDA workflows. Any help is greatly appreciated!

@jithunnair-amd jithunnair-amd Jan 28, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because it's assuming the image is on ghcr.io, whereas it's actually on dockerhub...

The "aws: command not found" errors can be ignored, but you'll probably need an AWS login via OIDC step to access any S3 buckets as part of the workflow e.g. https://github.com/pytorch/pytorch/blob/2b610902b46d0cbbb64923544f37feec0139cdfa/.github/actions/setup-rocm/action.yml#L115

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll also need to add a permissions section to your workflow with id-token: write for the OIDC step to work successfully e.g.
https://github.com/pytorch/pytorch/blob/2b610902b46d0cbbb64923544f37feec0139cdfa/.github/workflows/_rocm-test.yml#L73

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you're already calling setup-rocm in your workflow, so I think it'll try to do the AWS OIDC login step as well. But you'll probably still need the permissions clause.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

on:
push:
tags:
- ciflow/rocm/*

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scotts A few more steps to get this system working:

  1. Create a ciflow/rocm label on kineto repo (to be used on PRs)
  2. Add pytorch-probot.yaml to kineto repo like https://github.com/meta-pytorch/monarch/blob/main/.github/pytorch-probot.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't add labels on Kineto PRs. Please try adding the ciflow/rocm label and we can see if it works as expected

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

Comment thread .github/workflows/linux_rocm.yml Outdated
- ciflow/rocm/*
branches:
- main
pull_request:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pull_request:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove pull_request and try to land this

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@scotts has updated the pull request. You must reimport the pull request before landing.

@scotts
scotts marked this pull request as ready for review January 30, 2026 14:50
@meta-codesync meta-codesync Bot closed this in 4709380 Jan 30, 2026
@meta-codesync

meta-codesync Bot commented Jan 30, 2026

Copy link
Copy Markdown

@scotts merged this pull request in 4709380.

@scotts
scotts deleted the ci_rocm branch April 4, 2026 01:09
ani300 pushed a commit to IBM/kineto-spyre that referenced this pull request Jul 28, 2026
Summary:
Depends on pytorch/kineto#1222.

Pull Request resolved: pytorch/kineto#1231

Reviewed By: atalman

Differential Revision: D91166410

Pulled By: scotts

fbshipit-source-id: e237b9c22815d9725bf4aa548085f73098939658
Signed-off-by: Antoni Viros i Martin <aviros@ibm.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants