-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Minimize PT 2.1 test bins * update config * stop spurious ec2 benchmark jobs * skip clarify * Update dlc_developer_config.toml * Update dlc_developer_config.toml
- Loading branch information
Showing
6 changed files
with
149 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
test/dlc_tests/ec2/pytorch/training/test_pytorch_training_2_1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import pytest | ||
|
||
import test.test_utils as test_utils | ||
|
||
from test.test_utils import ec2 | ||
|
||
from test.dlc_tests.ec2.pytorch.training import common_cases | ||
from test.dlc_tests.ec2 import smclarify_cases | ||
|
||
|
||
@pytest.mark.usefixtures("sagemaker") | ||
@pytest.mark.integration("PT21_general") | ||
@pytest.mark.model("N/A") | ||
@pytest.mark.team("conda") | ||
@pytest.mark.parametrize( | ||
"ec2_instance_type, region", common_cases.PT_EC2_GPU_INSTANCE_TYPE_AND_REGION, indirect=True | ||
) | ||
def test_pytorch_2_1_gpu( | ||
pytorch_training___2__1, ec2_connection, region, gpu_only, ec2_instance_type | ||
): | ||
pytorch_training = pytorch_training___2__1 | ||
if test_utils.is_image_incompatible_with_instance_type(pytorch_training, ec2_instance_type): | ||
pytest.skip( | ||
f"Image {pytorch_training} is incompatible with instance type {ec2_instance_type}" | ||
) | ||
|
||
test_cases = [ | ||
(common_cases.pytorch_standalone, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_train_mnist, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_linear_regression_gpu, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_gloo, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_nccl, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_mpi, (pytorch_training, ec2_connection)), | ||
(common_cases.nvapex, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_training_torchaudio, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_cudnn_match_gpu, (pytorch_training, ec2_connection, region)), | ||
(common_cases.pytorch_training_torchdata, (pytorch_training, ec2_connection)), | ||
] | ||
|
||
if "sagemaker" in pytorch_training: | ||
test_cases.append( | ||
(smclarify_cases.smclarify_metrics_gpu, (pytorch_training, ec2_connection)), | ||
) | ||
|
||
# AMP must be run on multi_gpu | ||
if ec2.is_instance_multi_gpu(ec2_instance_type): | ||
test_cases.append((common_cases.pytorch_amp, (pytorch_training, ec2_connection))) | ||
|
||
test_utils.execute_serial_test_cases(test_cases, test_description="PT 2.1 GPU") | ||
|
||
|
||
@pytest.mark.usefixtures("sagemaker") | ||
@pytest.mark.integration("inductor") | ||
@pytest.mark.model("N/A") | ||
@pytest.mark.team("training-compiler") | ||
@pytest.mark.parametrize( | ||
"ec2_instance_type, region", | ||
common_cases.PT_EC2_GPU_INDUCTOR_INSTANCE_TYPE_AND_REGION, | ||
indirect=True, | ||
) | ||
def test_pytorch_2_1_gpu_inductor( | ||
pytorch_training___2__1, ec2_connection, region, gpu_only, ec2_instance_type | ||
): | ||
pytorch_training = pytorch_training___2__1 | ||
if test_utils.is_image_incompatible_with_instance_type(pytorch_training, ec2_instance_type): | ||
pytest.skip( | ||
f"Image {pytorch_training} is incompatible with instance type {ec2_instance_type}" | ||
) | ||
|
||
test_cases = [ | ||
(common_cases.pytorch_gloo_inductor_gpu, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_mpi_inductor_gpu, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_nccl_inductor, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_amp_inductor, (pytorch_training, ec2_connection)), | ||
] | ||
|
||
test_utils.execute_serial_test_cases(test_cases, test_description="PT 2.1 GPU Inductor") | ||
|
||
|
||
@pytest.mark.usefixtures("sagemaker") | ||
@pytest.mark.integration("pytorch_sanity_test") | ||
@pytest.mark.model("N/A") | ||
@pytest.mark.team("conda") | ||
@pytest.mark.parametrize("ec2_instance_type", common_cases.PT_EC2_CPU_INSTANCE_TYPE, indirect=True) | ||
def test_pytorch_2_1_cpu(pytorch_training___2__1, ec2_connection, cpu_only): | ||
pytorch_training = pytorch_training___2__1 | ||
|
||
test_cases = [ | ||
(common_cases.pytorch_standalone, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_train_mnist, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_linear_regression_cpu, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_gloo, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_mpi, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_training_torchaudio, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_telemetry_cpu, (pytorch_training, ec2_connection)), | ||
(common_cases.pytorch_training_torchdata, (pytorch_training, ec2_connection)), | ||
] | ||
|
||
if "sagemaker" in pytorch_training: | ||
test_cases += [ | ||
(smclarify_cases.smclarify_metrics_cpu, (pytorch_training, ec2_connection)), | ||
] | ||
|
||
test_utils.execute_serial_test_cases(test_cases, test_description="PT 2.1 CPU") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.