|
33 | 33 | )
|
34 | 34 | from pytorch_lightning.utilities.cloud_io import atomic_save, get_filesystem, load
|
35 | 35 | from pytorch_lightning.utilities.data import has_iterable_dataset, has_len
|
36 |
| -from pytorch_lightning.utilities.device_parser import ( |
37 |
| - determine_root_gpu_device, |
38 |
| - is_cuda_available, |
39 |
| - num_cuda_devices, |
40 |
| - parse_cpu_cores, |
41 |
| - parse_gpu_ids, |
42 |
| - parse_hpus, |
43 |
| - parse_tpu_cores, |
44 |
| -) |
45 | 36 | from pytorch_lightning.utilities.optimizer import optimizer_to_device, optimizers_to_device
|
46 | 37 | from pytorch_lightning.utilities.seed import pl_worker_init_function, reset_seed, seed_everything
|
47 | 38 |
|
@@ -104,29 +95,6 @@ def test_v1_10_deprecated_data_utilities():
|
104 | 95 | has_len(DataLoader(RandomDataset(2, 4)))
|
105 | 96 |
|
106 | 97 |
|
107 |
| -def test_v1_10_deprecated_device_parser_utilities(): |
108 |
| - with pytest.deprecated_call(match="device_parser.determine_root_gpu_device` has been deprecated in v1.8.0"): |
109 |
| - determine_root_gpu_device(None) |
110 |
| - |
111 |
| - with pytest.deprecated_call(match="device_parser.is_cuda_available` has been deprecated in v1.8.0"): |
112 |
| - is_cuda_available() |
113 |
| - |
114 |
| - with pytest.deprecated_call(match="device_parser.num_cuda_devices` has been deprecated in v1.8.0"): |
115 |
| - num_cuda_devices() |
116 |
| - |
117 |
| - with pytest.deprecated_call(match="device_parser.parse_hpus` has been deprecated in v1.8.0"): |
118 |
| - parse_hpus(1) |
119 |
| - |
120 |
| - with pytest.deprecated_call(match="device_parser.parse_cpu_cores` has been deprecated in v1.8.0"): |
121 |
| - parse_cpu_cores(1) |
122 |
| - |
123 |
| - with pytest.deprecated_call(match="device_parser.parse_gpu_ids` has been deprecated in v1.8.0"): |
124 |
| - parse_gpu_ids(None) |
125 |
| - |
126 |
| - with pytest.deprecated_call(match="device_parser.parse_tpu_cores` has been deprecated in v1.8.0"): |
127 |
| - parse_tpu_cores(None) |
128 |
| - |
129 |
| - |
130 | 98 | def test_v1_10_deprecated_optimizer_utilities():
|
131 | 99 | with pytest.deprecated_call(match="optimizer.optimizers_to_device` has been deprecated in v1.8.0"):
|
132 | 100 | optimizers_to_device([torch.optim.Adam(torch.nn.Linear(1, 1).parameters())], "cpu")
|
|
0 commit comments