Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the v100 SU definition so it's aligned with what we advertise #99

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openshift_metrics/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def get_service_unit(self) -> ServiceUnit:
su_config = {
SU_CPU: {"gpu": -1, "cpu": 1, "ram": 4},
SU_A100_GPU: {"gpu": 1, "cpu": 24, "ram": 74},
SU_A100_SXM4_GPU: {"gpu": 1, "cpu": 32, "ram": 245},
SU_V100_GPU: {"gpu": 1, "cpu": 24, "ram": 192},
SU_A100_SXM4_GPU: {"gpu": 1, "cpu": 32, "ram": 240},
SU_V100_GPU: {"gpu": 1, "cpu": 48, "ram": 192},
SU_UNKNOWN_GPU: {"gpu": 1, "cpu": 8, "ram": 64},
SU_UNKNOWN_MIG_GPU: {"gpu": 1, "cpu": 8, "ram": 64},
SU_UNKNOWN: {"gpu": -1, "cpu": 1, "ram": 1},
Expand Down
9 changes: 8 additions & 1 deletion openshift_metrics/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,19 @@ def test_known_gpu(self):
self.assertEqual(determining_resource, "GPU")

def test_known_gpu_A100_SXM4(self):
pod = self.make_pod(32, 245, 1, invoice.GPU_A100_SXM4, invoice.WHOLE_GPU)
pod = self.make_pod(32, 240, 1, invoice.GPU_A100_SXM4, invoice.WHOLE_GPU)
su_type, su_count, determining_resource = pod.get_service_unit()
self.assertEqual(su_type, invoice.SU_A100_SXM4_GPU)
self.assertEqual(su_count, 1)
self.assertEqual(determining_resource, "GPU")

def test_known_gpu_V100(self):
pod = self.make_pod(48, 192, 1, invoice.GPU_V100, invoice.WHOLE_GPU)
su_type, su_count, determining_resource = pod.get_service_unit()
self.assertEqual(su_type, invoice.SU_V100_GPU)
self.assertEqual(su_count, 1)
self.assertEqual(determining_resource, "GPU")

def test_known_gpu_high_cpu(self):
pod = self.make_pod(50, 96, 1, invoice.GPU_A100, invoice.WHOLE_GPU)
su_type, su_count, determining_resource = pod.get_service_unit()
Expand Down