Skip to content

[Feature] Native support for Huawei Ascend NPUs ([huawei.com/Ascend](https://huawei.com/Ascend)*) #5039

Description

@bakhovaddinov

Search before asking

  • I had searched in the issues and found no similar feature requirement.

KubeRay Component

Others

Description

Currently, KubeRay natively parses standard GPUs (like [nvidia.com/gpu](https://nvidia.com/gpu)) and automatically configures the Ray scheduler. However, it lacks native detection for Huawei Ascend NPUs ([huawei.com/Ascend910](https://huawei.com/Ascend910), etc.).

If a user requests Ascend NPUs in the container limits, KubeRay mounts the physical hardware but does not register the resources with Ray. Users currently have to manually inject a custom resource JSON into rayStartParams as a workaround:

  workerGroupSpecs:
  - groupName: ascend-workers
    rayStartParams:
      resources: '"{\"NPU\": 2}"'  # <-- Manual workaround required
    template:
      spec:
        containers:
        - name: ray-worker
          resources:
            limits:
              huawei.com/Ascend910: 2

Proposed Solution:
Add parsing logic to ray-operator/controllers/ray/common/pod.go to detect Kubernetes resource limits starting with [huawei.com/Ascend](https://huawei.com/Ascend)* and automatically map them to Ray's native NPU resource identifier. This would provide the same seamless deployment experience as standard GPUs and eliminate the need for the manual YAML injection.

Are the maintainers open to a Pull Request for this feature? I would be happy to contribute the Go logic to handle the chip generation parsing.

Use case

No response

Related issues

#1984

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions