Skip to content

Add AMD GPU test for ray clusters #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

ChughShilpa
Copy link
Contributor

@ChughShilpa ChughShilpa commented Mar 10, 2025

Issue link

Closes RHOAIENG-11047

What changes have been made

  1. Add codeflare-operator e2e tests to run with AMD gpu and AMD ROCm Ray base container image
  2. Removes usage of numberofGpus parameter from createClusterQueue, constructRayCluster and constructRayJob method

Verification steps

Manually run the tests on OCP with NVIDIA and AMD gpus

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

PIP_TRUSTED_HOST: "` + GetPipTrustedHost() + `"
ACCELERATOR: "` + accelerator + `"
`,
RuntimeEnvYAML: fmt.Sprintf(`
Copy link
Contributor

Choose a reason for hiding this comment

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

It is also possible to generate the yaml from struct - i.e. using https://pkg.go.dev/sigs.k8s.io/yaml#section-readme.
Though, as this yaml handling is relevant just for this one place - it is ok to keep current implementation.

Copy link
Contributor

@Fiona-Waters Fiona-Waters left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks @ChughShilpa


if accelerator.IsGpu() {
cqSpec.ResourceGroups[0].Flavors[0].Resources[2].NominalQuota = resource.MustParse("1")
if accelerator.ResourceLabel == "amd.com/gpu" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

@sutaakar
Copy link
Contributor

Please adjust https://github.com/project-codeflare/codeflare-operator/blob/main/.github/workflows/e2e_tests.yaml#L92 to skip both CPU and AMD tests.

Copy link
Contributor

@sutaakar sutaakar left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks

Copy link

openshift-ci bot commented Mar 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiripetrlik, sutaakar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit a96625a into project-codeflare:main Mar 20, 2025
8 checks passed
@ChughShilpa ChughShilpa deleted the amd branch March 20, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants