Skip to content

Commit

Permalink
name change
Browse files Browse the repository at this point in the history
  • Loading branch information
Cemberk committed Jul 24, 2024
1 parent 81191c1 commit 6e87c7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@
IS_ROCM_SYSTEM = False
IS_CUDA_SYSTEM = False

_run_rocm_tests = parse_flag_from_env("RUN_ROCM_TESTS", default=False)
_hf_rocm_test = parse_flag_from_env("HF_ROCM_TEST", default=False)

def skipIfRocm(func=None, *, msg="test doesn't currently work on the ROCm stack"):
def dec_fn(fn):
reason = f"skipIfRocm: {msg}"

@wraps(fn)
def wrapper(*args, **kwargs):
if _run_rocm_tests:
if _hf_rocm_test:
pytest.skip(reason)
else:
return fn(*args, **kwargs)
Expand Down

0 comments on commit 6e87c7e

Please sign in to comment.