Skip to content
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

Supports sum the GPU counts of Aliyun and Volcano #2490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zjj2wry
Copy link

@zjj2wry zjj2wry commented Nov 4, 2024

Why are these changes needed?

Related issue number

Closes #2484

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@@ -1619,8 +1620,12 @@ func (r *RayClusterReconciler) updateRayClusterStatus(ctx context.Context, origi
func sumGPUs(resources map[corev1.ResourceName]resource.Quantity) resource.Quantity {
totalGPUs := resource.Quantity{}

// Define a regular expression to match valid GPU resource names
gpuPattern := regexp.MustCompile(`^(.*?/)?(gpu(-count)?|gpu-core\.percentage)$`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest to add these in the list of well known accelerators instread: https://github.com/ray-project/kuberay/blob/master/ray-operator/controllers/ray/common/pod.go#L41-L43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Statistics of other types of gpu
2 participants