Skip to content

Commit 996e876

Browse files
8274-mitigate-gpu-load-check (Project-MONAI#8275)
Fixes Project-MONAI#8274 . ### Description I tried to use A100 with same container to test, but could not reproduce the issue. Therefore, I think here we can do a bit change on the test, and if there are still same issues, I will try to check more. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Yiheng Wang <vennw@nvidia.com>
1 parent d36f0c8 commit 996e876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_load_image.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def test_nibabel_reader_gpu(self, input_param, filenames, expected_shape):
233233
input_param_cpu = input_param.copy()
234234
input_param_cpu["to_gpu"] = False
235235
result_cpu = LoadImage(image_only=True, **input_param_cpu)(filenames)
236-
self.assertTrue(torch.equal(result_cpu, result.cpu()))
236+
self.assertTrue(torch.allclose(result_cpu, result.cpu(), atol=1e-6))
237237

238238
@parameterized.expand([TEST_CASE_6, TEST_CASE_7, TEST_CASE_8, TEST_CASE_8_1, TEST_CASE_9])
239239
def test_itk_reader(self, input_param, filenames, expected_shape):

0 commit comments

Comments
 (0)