You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/10/18 12:46:14 UTC

[GitHub] [yunikorn-site] KatLantyss opened a new pull request, #199: [YUNIKORN-1360] Revise TensorFlow GPU Time-Slicing example on Yunikorn site

KatLantyss opened a new pull request, #199:
URL: https://github.com/apache/yunikorn-site/pull/199

   ## Issue
   - Revise TensorFlow GPU Time-Slicing example on Yunikorn site.
   
   ## Link
   https://issues.apache.org/jira/browse/YUNIKORN-1360?filter=-1
   
   ## Solve
   https://yunikorn.apache.org/docs/next/user_guide/workloads/run_tf#using-time-slicing-gpu
   - Merge Prerequisite part to [YUNIKORN-1355](https://issues.apache.org/jira/browse/YUNIKORN-1355).
   - Correct and Revise some wrong content.
   - Add more result in Testing TensorFlow Job with GPUs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [yunikorn-site] 0yukali0 commented on a diff in pull request #199: [YUNIKORN-1360] Revise TensorFlow GPU Time-Slicing example on Yunikorn site

Posted by GitBox <gi...@apache.org>.
0yukali0 commented on code in PR #199:
URL: https://github.com/apache/yunikorn-site/pull/199#discussion_r1000029921


##########
docs/user_guide/workloads/run_nvidia.md:
##########
@@ -0,0 +1,255 @@
+---
+id: run_nvidia
+title: Run NVIDIA GPU Scheduling Jobs
+description: How to run generic example of GPU scheduling with Yunikorn.
+keywords:
+ - NVIDIA GPU
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+To know how the GPU scheduling works, please refer to [**Time-Slicing GPUs in Kubernetes | Introduction**](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/gpu-sharing.html#introduction). This page covers ways to enable GPU scheduling in Yunikorn using [**NVIDIA GPU Operator**](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/gpu-operator).
+
+:::info
+Before following this guide, Yunikorn need to deploy on the [**Kubernetes with GPUs**](https://docs.nvidia.com/datacenter/cloud-native/kubernetes/install-k8s.html#install-kubernetes).
+:::
+
+## Configuration
+Specify multiple configurations in a `ConfigMap` as in the following example.

Review Comment:
   Add a description to explain how to change the yaml context according to the GPU types.
   ::: note
   If the GPU type in nodes do not include the a100-40gb or rtx-3070, you could modify the yaml file based on existing GPU types.
   For example,  there are only multiple rtx-2080ti in the local kubernetes cluster.
   MIG is not supported by rtx-2080ti, so it could not replace the a100-40gb.
   Time slicing is supported by rtx-2080ti, so it could replace rtx-3070.
   :::



##########
docs/user_guide/workloads/run_nvidia.md:
##########
@@ -0,0 +1,255 @@
+---
+id: run_nvidia
+title: Run NVIDIA GPU Scheduling Jobs
+description: How to run generic example of GPU scheduling with Yunikorn.
+keywords:
+ - NVIDIA GPU
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+To know how the GPU scheduling works, please refer to [**Time-Slicing GPUs in Kubernetes | Introduction**](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/gpu-sharing.html#introduction). This page covers ways to enable GPU scheduling in Yunikorn using [**NVIDIA GPU Operator**](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/gpu-operator).
+
+:::info
+Before following this guide, Yunikorn need to deploy on the [**Kubernetes with GPUs**](https://docs.nvidia.com/datacenter/cloud-native/kubernetes/install-k8s.html#install-kubernetes).
+:::
+
+## Configuration
+Specify multiple configurations in a `ConfigMap` as in the following example.
+```yaml
+# time-slicing-config.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: time-slicing-config
+  namespace: nvidia
+data:
+    a100-40gb: |-
+        version: v1
+        sharing:
+          timeSlicing:
+            resources:
+            - name: nvidia.com/gpu
+              replicas: 8
+            - name: nvidia.com/mig-1g.5gb
+              replicas: 2
+            - name: nvidia.com/mig-2g.10gb
+              replicas: 2
+            - name: nvidia.com/mig-3g.20gb
+              replicas: 3
+            - name: nvidia.com/mig-7g.40gb
+              replicas: 7
+    rtx-3070: |-
+        version: v1
+        sharing:
+          timeSlicing:
+            resources:
+            - name: nvidia.com/gpu
+              replicas: 8
+```
+:::note
+MIG support was added to Kubernetes in 2020. Refer to [**Supporting MIG in Kubernetes**](https://www.google.com/url?q=https://docs.google.com/document/d/1mdgMQ8g7WmaI_XVVRrCvHPFPOMCm5LQD5JefgAh6N8g/edit&sa=D&source=editors&ust=1655578433019961&usg=AOvVaw1F-OezvM-Svwr1lLsdQmu3) for details on how this works.
+:::
+
+Create a `ConfigMap` in the operator namespace. 
+```bash
+kubectl create namespace nvidia
+kubectl create -f time-slicing-config.yaml
+```
+
+## Install NVIDIA GPU Operator
+Add the nvidia-gpu-operator helm repository.
+```bash
+helm repo add nvidia https://helm.ngc.nvidia.com/nvidia
+helm repo update
+helm repo list
+```
+
+Enabling shared access to GPUs with the NVIDIA GPU Operator.
+- During fresh install of the NVIDIA GPU Operator with time-slicing enabled.
+  ```bash
+  helm install gpu-operator nvidia/gpu-operator \
+      -n nvidia \
+      --set devicePlugin.config.name=time-slicing-config
+  ```
+
+- For dynamically enabling time-slicing with GPU Operator already installed.
+  ```bash
+  kubectl patch clusterpolicy/cluster-policy \
+  -n nvidia --type merge \
+  -p '{"spec": {"devicePlugin": {"config": {"name": "time-slicing-config"}}}}'
+  ```
+
+## Applying the Time-Slicing Configuration
+There are two methods:
+- Across the Cluster
+
+  Install the GPU Operator by passing the time-slicing `ConfigMap` name and the default configuration.
+  ```bash
+  kubectl patch clusterpolicy/cluster-policy \
+    -n nvidia --type merge \
+    -p '{"spec": {"devicePlugin": {"config": {"name": "time-slicing-config", "default": "rtx-3070"}}}}'
+  ```
+
+- Per Node

Review Comment:
   Applying time-slicing configuration on certain nodes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [yunikorn-site] 0yukali0 commented on pull request #199: [YUNIKORN-1360] Revise TensorFlow GPU Time-Slicing example on Yunikorn site

Posted by GitBox <gi...@apache.org>.
0yukali0 commented on PR #199:
URL: https://github.com/apache/yunikorn-site/pull/199#issuecomment-1284986066

   Ok.
   For reducing the duplicate part, could we finish YUNIKORN-1355 before finishing YUNIKORN-1360?
   I will add the comments to the YUNIKORN-1355 too.
   If you agree, I would close this PR later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [yunikorn-site] KatLantyss commented on pull request #199: [YUNIKORN-1360] Revise TensorFlow GPU Time-Slicing example on Yunikorn site

Posted by GitBox <gi...@apache.org>.
KatLantyss commented on PR #199:
URL: https://github.com/apache/yunikorn-site/pull/199#issuecomment-1284976265

   I would like to link the page which is in [YUNIKORN-1355|https://github.com/apache/yunikorn-site/pull/198] (Run NVIDIA GPU Scheduling Jobs), but there is no page correspond in master yet.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [yunikorn-site] KatLantyss closed pull request #199: [YUNIKORN-1360] Revise TensorFlow GPU Time-Slicing example on Yunikorn site

Posted by GitBox <gi...@apache.org>.
KatLantyss closed pull request #199: [YUNIKORN-1360] Revise TensorFlow GPU Time-Slicing example on Yunikorn site
URL: https://github.com/apache/yunikorn-site/pull/199


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [yunikorn-site] 0yukali0 commented on pull request #199: [YUNIKORN-1360] Revise TensorFlow GPU Time-Slicing example on Yunikorn site

Posted by GitBox <gi...@apache.org>.
0yukali0 commented on PR #199:
URL: https://github.com/apache/yunikorn-site/pull/199#issuecomment-1284971906

   Hi @KatLantyss , [YUNIKORN-1355](https://github.com/apache/yunikorn-site/pull/198) has similar modification as this issue.
   I am confused this phenomenon.
   Could you describe the difference of these modification in these issues?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org