From 634efde90b3b3ce668f35be8d5504fd89bf77218 Mon Sep 17 00:00:00 2001 From: Floris-Jan Willemsen Date: Tue, 3 Oct 2023 15:42:29 +0200 Subject: [PATCH] Temporarily skip broken HIP tests as per issue #217, avoided error in Noxfile when no temporary files are present --- noxfile.py | 16 ++++++++-------- test/test_hip_functions.py | 9 ++++++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/noxfile.py b/noxfile.py index 26f861d9e..1bb30a8c4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -66,6 +66,13 @@ def tests(session: Session) -> None: else: raise ValueError(f"Unrecognized argument {arg}") + # check if there are optional dependencies that can not be installed + if install_hip: + if platform.system().lower() != 'linux': + session.warn("HIP is only available on Linux, disabling dependency and tests") + install_hip = False + full_install = install_cuda and install_hip and install_opencl and install_additional_tests + # if the user has a small disk, remove the other environment caches before each session is ran if small_disk: try: @@ -76,14 +83,7 @@ def tests(session: Session) -> None: session.warn(error) # remove temporary files leftover from the previous session - session.run("rm", "temp_*.c") - - # check if there are optional dependencies that can not be installed - if install_hip: - if platform.system().lower() != 'linux': - session.warn("HIP is only available on Linux, disabling dependency and tests") - install_hip = False - full_install = install_cuda and install_hip and install_opencl and install_additional_tests + session.run("rm", "-f", "temp_*.c") # set extra arguments based on optional dependencies extras_args = [] diff --git a/test/test_hip_functions.py b/test/test_hip_functions.py index df0893788..b55230036 100644 --- a/test/test_hip_functions.py +++ b/test/test_hip_functions.py @@ -38,7 +38,8 @@ def env(): return ["vector_add", kernel_string, size, args, tune_params] -@skip_if_no_pyhip +# @skip_if_no_pyhip +@pytest.mark.skip("Currently broken due to pull request #216, to be fixed in issue #217") def test_ready_argument_list(): size = 1000 @@ -68,7 +69,8 @@ def __getitem__(self, key): assert(gpu_args[1] == argListStructure[1]) assert(gpu_args[3] == argListStructure[3]) -@skip_if_no_pyhip +# @skip_if_no_pyhip +@pytest.mark.skip("Currently broken due to pull request #216, to be fixed in issue #217") def test_compile(): kernel_string = """ @@ -117,7 +119,8 @@ def test_memcpy_htod(): assert all(output == x) -@skip_if_no_pyhip +# @skip_if_no_pyhip +@pytest.mark.skip("Currently broken due to pull request #216, to be fixed in issue #217") def test_copy_constant_memory_args(): kernel_string = """ __constant__ float my_constant_data[100];