Skip to content

Commit e0b993d

Browse files
committed
Allow billing of H100 GPUs
1 parent 174864a commit e0b993d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

openshift_metrics/invoice.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,23 @@
99
GPU_A100 = "NVIDIA-A100-40GB"
1010
GPU_A100_SXM4 = "NVIDIA-A100-SXM4-40GB"
1111
GPU_V100 = "Tesla-V100-PCIE-32GB"
12+
GPU_H100 = "???-H100-???-???" # TODO Confirm name of H100 in Openstack
1213
GPU_UNKNOWN_TYPE = "GPU_UNKNOWN_TYPE"
1314

1415
# GPU Resource - MIG Geometries
1516
# A100 Strategies
1617
MIG_1G_5GB = "nvidia.com/mig-1g.5gb"
1718
MIG_2G_10GB = "nvidia.com/mig-2g.10gb"
1819
MIG_3G_20GB = "nvidia.com/mig-3g.20gb"
20+
# TODO Will we allow MIG on H100s?
1921
WHOLE_GPU = "nvidia.com/gpu"
2022

2123
# SU Types
2224
SU_CPU = "OpenShift CPU"
2325
SU_A100_GPU = "OpenShift GPUA100"
2426
SU_A100_SXM4_GPU = "OpenShift GPUA100SXM4"
2527
SU_V100_GPU = "OpenShift GPUV100"
28+
SU_H100_GPU = "OpenShift GPUH100" # TODO Confirm name of H100 SU Name
2629
SU_UNKNOWN_GPU = "OpenShift Unknown GPU"
2730
SU_UNKNOWN_MIG_GPU = "OpenShift Unknown MIG GPU"
2831
SU_UNKNOWN = "Openshift Unknown"
@@ -65,6 +68,7 @@ def get_service_unit(self) -> ServiceUnit:
6568
GPU_A100: SU_A100_GPU,
6669
GPU_A100_SXM4: SU_A100_SXM4_GPU,
6770
GPU_V100: SU_V100_GPU,
71+
GPU_H100: SU_H100_GPU,
6872
}
6973

7074
A100_SXM4_MIG = {
@@ -79,6 +83,7 @@ def get_service_unit(self) -> ServiceUnit:
7983
SU_A100_GPU: {"gpu": 1, "cpu": 24, "ram": 74},
8084
SU_A100_SXM4_GPU: {"gpu": 1, "cpu": 32, "ram": 245},
8185
SU_V100_GPU: {"gpu": 1, "cpu": 24, "ram": 192},
86+
SU_H100_GPU: {"gpu": 1, "cpu": 64, "ram": 384},
8287
SU_UNKNOWN_GPU: {"gpu": 1, "cpu": 8, "ram": 64},
8388
SU_UNKNOWN_MIG_GPU: {"gpu": 1, "cpu": 8, "ram": 64},
8489
SU_UNKNOWN: {"gpu": -1, "cpu": 1, "ram": 1},
@@ -179,6 +184,7 @@ class Rates:
179184
gpu_a100: Decimal
180185
gpu_a100sxm4: Decimal
181186
gpu_v100: Decimal
187+
gpu_h100: Decimal
182188

183189

184190
@dataclass
@@ -201,6 +207,7 @@ class ProjectInvoce:
201207
SU_A100_GPU: 0,
202208
SU_A100_SXM4_GPU: 0,
203209
SU_V100_GPU: 0,
210+
SU_H100_GPU: 0,
204211
SU_UNKNOWN_GPU: 0,
205212
SU_UNKNOWN_MIG_GPU: 0,
206213
SU_UNKNOWN: 0,

openshift_metrics/merge.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def main():
6969
parser.add_argument("--rate-gpu-v100-su", type=Decimal)
7070
parser.add_argument("--rate-gpu-a100sxm4-su", type=Decimal)
7171
parser.add_argument("--rate-gpu-a100-su", type=Decimal)
72+
parser.add_argument("--rate-gpu-h100-su", type=Decimal)
7273

7374
args = parser.parse_args()
7475
files = args.files
@@ -115,13 +116,15 @@ def main():
115116
gpu_a100=Decimal(nerc_data.get_value_at("GPUA100 SU Rate", report_month)),
116117
gpu_a100sxm4=Decimal(nerc_data.get_value_at("GPUA100SXM4 SU Rate", report_month)),
117118
gpu_v100=Decimal(nerc_data.get_value_at("GPUV100 SU Rate", report_month)),
119+
gpu_h100=Decimal(nerc_data.get_value_at("GPUH100 SU Rate", report_month)),
118120
)
119121
else:
120122
rates = invoice.Rates(
121123
cpu=Decimal(args.rate_cpu_su),
122124
gpu_a100=Decimal(args.rate_gpu_a100_su),
123125
gpu_a100sxm4=Decimal(args.rate_gpu_a100sxm4_su),
124-
gpu_v100=Decimal(args.rate_gpu_v100_su)
126+
gpu_v100=Decimal(args.rate_gpu_v100_su),
127+
gpu_h100=Decimal(args.rate_gpu_h100_su),
125128
)
126129

127130
if args.invoice_file:

openshift_metrics/tests/test_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
cpu = Decimal("0.013"),
2424
gpu_a100sxm4 = Decimal("2.078"),
2525
gpu_a100 = Decimal("1.803"),
26-
gpu_v100 = Decimal("1.214")
26+
gpu_v100 = Decimal("1.214"),
27+
gpu_h100 = Decimal("6.04"),
2728
)
2829

2930
class TestGetNamespaceAnnotations(TestCase):

0 commit comments

Comments
 (0)