Skip to content

Commit 2a1a8ee

Browse files
committed
update
1 parent 8f7a0f3 commit 2a1a8ee

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,45 @@ $ kubectl apply -f k8s-dcu-plugin.yaml
2323
docker build .
2424
```
2525

26+
## Examples
27+
28+
```
29+
apiVersion: v1
30+
kind: Pod
31+
metadata:
32+
name: alexnet-tf-gpu-pod-mem
33+
labels:
34+
purpose: demo-tf-amdgpu
35+
spec:
36+
containers:
37+
- name: alexnet-tf-gpu-container
38+
image: ubuntu:20.04
39+
workingDir: /root
40+
command: ["sleep","infinity"]
41+
resources:
42+
limits:
43+
hygon.com/dcunum: 1 # requesting a GPU
44+
hygon.com/dcumem: 2000 # each dcu require 2000 MiB device memory
45+
hygon.com/dcucores: 15 # each dcu use 60% of total compute cores
46+
```
47+
48+
## Validatio
49+
50+
Inside container, use hy-virtual to validate
51+
52+
```
53+
source /opt/hygondriver/env.sh
54+
hy-virtual -show-device-info
55+
```
56+
57+
There will be output like these:
58+
```
59+
Device 0:
60+
Actual Device: 0
61+
Compute units: 9
62+
Global memory: 2097152000 bytes
63+
```
64+
2665
## Maintainer
2766

28-
limengxuan@4paradigm.com
67+
limengxuan

0 commit comments

Comments
 (0)