|
15 | 15 |
|
16 | 16 | import unittest |
17 | 17 |
|
| 18 | +import pytest |
18 | 19 | import torch |
19 | 20 |
|
20 | 21 | from diffusers import UNet1DModel |
@@ -152,20 +153,24 @@ def test_unet_1d_maestro(self): |
152 | 153 | assert (output_sum - 224.0896).abs() < 0.5 |
153 | 154 | assert (output_max - 0.0607).abs() < 4e-4 |
154 | 155 |
|
155 | | - @unittest.skip( |
156 | | - "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
157 | | - "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
158 | | - "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
159 | | - "2. Unskip this test." |
| 156 | + @pytest.mark.xfail( |
| 157 | + reason=( |
| 158 | + "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
| 159 | + "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
| 160 | + "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
| 161 | + "2. Unskip this test." |
| 162 | + ), |
160 | 163 | ) |
161 | 164 | def test_layerwise_casting_inference(self): |
162 | | - pass |
163 | | - |
164 | | - @unittest.skip( |
165 | | - "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
166 | | - "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
167 | | - "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
168 | | - "2. Unskip this test." |
| 165 | + super().test_layerwise_casting_inference() |
| 166 | + |
| 167 | + @pytest.mark.xfail( |
| 168 | + reason=( |
| 169 | + "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
| 170 | + "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
| 171 | + "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
| 172 | + "2. Unskip this test." |
| 173 | + ), |
169 | 174 | ) |
170 | 175 | def test_layerwise_casting_memory(self): |
171 | 176 | pass |
@@ -293,20 +298,24 @@ def test_forward_with_norm_groups(self): |
293 | 298 | # Not implemented yet for this UNet |
294 | 299 | pass |
295 | 300 |
|
296 | | - @unittest.skip( |
297 | | - "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
298 | | - "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
299 | | - "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
300 | | - "2. Unskip this test." |
| 301 | + @pytest.mark.xfail( |
| 302 | + reason=( |
| 303 | + "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
| 304 | + "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
| 305 | + "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
| 306 | + "2. Unskip this test." |
| 307 | + ), |
301 | 308 | ) |
302 | 309 | def test_layerwise_casting_inference(self): |
303 | 310 | pass |
304 | 311 |
|
305 | | - @unittest.skip( |
306 | | - "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
307 | | - "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
308 | | - "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
309 | | - "2. Unskip this test." |
| 312 | + @pytest.mark.xfail( |
| 313 | + reason=( |
| 314 | + "RuntimeError: 'fill_out' not implemented for 'Float8_e4m3fn'. The error is caused due to certain torch.float8_e4m3fn and torch.float8_e5m2 operations " |
| 315 | + "not being supported when using deterministic algorithms (which is what the tests run with). To fix:\n" |
| 316 | + "1. Wait for next PyTorch release: https://github.com/pytorch/pytorch/issues/137160.\n" |
| 317 | + "2. Unskip this test." |
| 318 | + ), |
310 | 319 | ) |
311 | 320 | def test_layerwise_casting_memory(self): |
312 | 321 | pass |
0 commit comments