Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/test_rand_affine_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from monai.transforms import RandAffineGrid
from tests.utils import TEST_NDARRAYS, assert_allclose, is_tf32_env

_rtol = 1e-1 if is_tf32_env else 1e-4
_rtol = 1e-1 if is_tf32_env() else 1e-4

TESTS = []
for p in TEST_NDARRAYS:
Expand Down
2 changes: 0 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,11 @@ def _wrapper(*args, **kwargs):

def _cache_original_func(obj) -> None:
"""cache the original function by name, so that the decorator doesn't shadow it."""
global _original_funcs
_original_funcs[obj.__name__] = obj


def _del_original_func(obj):
"""pop the original function from cache."""
global _original_funcs
_original_funcs.pop(obj.__name__, None)
if torch.cuda.is_available(): # clean up the cached function
torch.cuda.synchronize()
Expand Down