diff --git a/src/platform-aws.c b/src/platform-aws.c index 3cf3f58f2..c97517cef 100644 --- a/src/platform-aws.c +++ b/src/platform-aws.c @@ -71,7 +71,7 @@ static struct ec2_platform_data platform_data_map[] = { }, { .name = "p-series", - .regex = "^p5.*", + .regex = "^p([5-9]|[0-9]{2,}).*", .topology = NULL, .default_dup_conns = 0, .latency = 75.0, @@ -145,7 +145,7 @@ struct ec2_platform_data *platform_aws_get_platform_entry(const char *platform_t break; } } else { - ret = regcomp(®ex, platform_data_list[idx].regex, 0); + ret = regcomp(®ex, platform_data_list[idx].regex, REG_EXTENDED); if (ret != 0) { NCCL_OFI_WARN("Could not compile platform_type regex for %s", platform_data_list[idx].regex); diff --git a/tests/unit/aws_platform_mapper.c b/tests/unit/aws_platform_mapper.c index 3885d01c7..d2dce149e 100644 --- a/tests/unit/aws_platform_mapper.c +++ b/tests/unit/aws_platform_mapper.c @@ -61,6 +61,9 @@ static int check_known_platforms(void) ret += check_value(platform_data_list, len, "g5.48xlarge", "g5.48xlarge"); ret += check_value(platform_data_list, len, "g6.16xlarge", NULL); + // obviously future platforms + ret += check_value(platform_data_list, len, "p100.2048xlarge", "p-series"); + return ret; }