File tree 1 file changed +40
-1
lines changed
1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,45 @@ $ kubectl apply -f k8s-dcu-plugin.yaml
23
23
docker build .
24
24
```
25
25
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
+
26
65
## Maintainer
27
66
28
- limengxuan@4paradigm.com
67
+ limengxuan
You can’t perform that action at this time.
0 commit comments