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

feat: add aws_c5_18xlarge #980

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions torchx/specs/named_resources_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def aws_m5_2xlarge() -> Resource:
cpu=8, gpu=0, memMB=32 * GiB, capabilities={K8S_ITYPE: "m5.2xlarge"}
)

def aws_c5_18xlarge() -> Resource:
return Resource(
cpu=72, gpu=0, memMB=144 * GiB, capabilities={K8S_ITYPE: "c5.18xlarge"}
)

def aws_g4dn_xlarge() -> Resource:
return Resource(
Expand Down Expand Up @@ -351,6 +355,7 @@ def aws_trn1_32xlarge() -> Resource:
NAMED_RESOURCES: Mapping[str, Callable[[], Resource]] = {
"aws_t3.medium": aws_t3_medium,
"aws_m5.2xlarge": aws_m5_2xlarge,
"aws_c5.18xlarge": aws_c5_18xlarge,
"aws_p3.2xlarge": aws_p3_2xlarge,
"aws_p3.8xlarge": aws_p3_8xlarge,
"aws_p3.16xlarge": aws_p3_16xlarge,
Expand Down
7 changes: 7 additions & 0 deletions torchx/specs/test/named_resources_aws_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
aws_g6e_8xlarge,
aws_g6e_xlarge,
aws_m5_2xlarge,
aws_c5_18xlarge,
aws_p3_16xlarge,
aws_p3_2xlarge,
aws_p3_8xlarge,
Expand Down Expand Up @@ -237,6 +238,12 @@ def test_aws_m5_2xlarge(self) -> None:
self.assertEqual(0, resource.gpu)
self.assertEqual(32 * GiB, resource.memMB)

def test_aws_c5_18xlarge(self) -> None:
resource = aws_c5_18xlarge()
self.assertEqual(72, resource.cpu)
self.assertEqual(0, resource.gpu)
self.assertEqual(144 * GiB, resource.memMB)

def test_aws_t3_medium(self) -> None:
resource = aws_t3_medium()
self.assertEqual(2, resource.cpu)
Expand Down
Loading