From de1401550c47f4b11713734c14de85ebad90f9ca Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 24 Jan 2025 13:46:09 -0600 Subject: [PATCH] Change skip logic. --- pynvjitlink/tests/conftest.py | 2 +- pynvjitlink/tests/test_pynvjitlink.py | 13 +++++++------ pynvjitlink/tests/test_pynvjitlink_api.py | 12 ++++++------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pynvjitlink/tests/conftest.py b/pynvjitlink/tests/conftest.py index a7234ae..00ff38c 100644 --- a/pynvjitlink/tests/conftest.py +++ b/pynvjitlink/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. +# Copyright (c) 2024-2025, NVIDIA CORPORATION. import os diff --git a/pynvjitlink/tests/test_pynvjitlink.py b/pynvjitlink/tests/test_pynvjitlink.py index 87346c2..fb3425e 100644 --- a/pynvjitlink/tests/test_pynvjitlink.py +++ b/pynvjitlink/tests/test_pynvjitlink.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved. import pynvjitlink import pytest @@ -83,11 +83,12 @@ def test_get_error_log(undefined_extern_cubin, gpu_arch_flag): "in 'undefined_extern.cubin'" in error_log ) -@pytest.skipif( - gpu_compute_capability < (7, 5), - reason="CUDA 12.8 shows deprecations for devices older than sm75", -) -def test_get_info_log(device_functions_cubin, gpu_arch_flag): + +def test_get_info_log(device_functions_cubin, gpu_arch_flag, gpu_compute_capability): + if gpu_compute_capability < (7, 5): + pytest.skip( + "CUDA 12.8 shows deprecations for devices older than compute capability 7.5" + ) handle = _nvjitlinklib.create(gpu_arch_flag) filename, data = device_functions_cubin input_type = InputType.CUBIN.value diff --git a/pynvjitlink/tests/test_pynvjitlink_api.py b/pynvjitlink/tests/test_pynvjitlink_api.py index bb1dcec..2b8da83 100644 --- a/pynvjitlink/tests/test_pynvjitlink_api.py +++ b/pynvjitlink/tests/test_pynvjitlink_api.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved. import sys @@ -120,11 +120,11 @@ def test_get_error_log(undefined_extern_cubin, gpu_arch_flag): assert "Undefined reference to '_Z5undefff'" in error_log -@pytest.skipif( - gpu_compute_capability < (7, 5), - reason="CUDA 12.8 shows deprecations for devices older than sm75", -) -def test_get_info_log(device_functions_cubin, gpu_arch_flag): +def test_get_info_log(device_functions_cubin, gpu_arch_flag, gpu_compute_capability): + if gpu_compute_capability < (7, 5): + pytest.skip( + "CUDA 12.8 shows deprecations for devices older than compute capability 7.5" + ) nvjitlinker = NvJitLinker(gpu_arch_flag) name, cubin = device_functions_cubin nvjitlinker.add_cubin(cubin, name)