@@ -407,7 +407,7 @@ metadata:
407
407
spec :
408
408
selectors :
409
409
- cel :
410
- expression : device.driverName == "gpu.acme.example.com"
410
+ expression : device.driver == "gpu.acme.example.com"
411
411
config :
412
412
- opaque :
413
413
driver : gpu.acme.example.com
@@ -427,8 +427,14 @@ spec:
427
427
As a user, I want to use a GPU as accelerator, but don't need exclusive access
428
428
to that GPU. Running my workload with just 2Gb of memory is sufficient. This is
429
429
supported by the ACME GPU hardware. I know that the administrator has created
430
- an "acme-gpu" DeviceClass and that such devices have a
431
- ` gpu.acme.example.com/memory` attribute.
430
+ an "acme-gpu" DeviceClass and set up the hardware such that each card is
431
+ partitioned into slices of different sizes. Each slice is represented as
432
+ a device with a ` gpu.acme.example.com/memory` attribute that describes how
433
+ much memory is assigned to it.
434
+
435
+ **Note:** This partitioning is static. Dynamically reconfiguring a card to
436
+ match demand is not part of this KEP. It's covered by the ["partitionable
437
+ devices" extension](https://github.com/kubernetes/enhancements/issues/4815).
432
438
433
439
For a simple trial, I create a Pod directly where two containers share the same subset
434
440
of the GPU :
@@ -449,7 +455,7 @@ spec:
449
455
deviceClassName: acme-gpu
450
456
selectors:
451
457
- cel:
452
- expression: device.attributes["gpu.acme.example.com/memory"] .isGreaterThan(quantity("2Gi")) # Always set for ACME GPUs.
458
+ expression: device.attributes["gpu.acme.example.com"].memory .isGreaterThan(quantity("2Gi")) # Always set for ACME GPUs.
453
459
---
454
460
apiVersion: v1
455
461
kind: Pod
0 commit comments