Skip to content

Commit

Permalink
Change skip logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Jan 24, 2025
1 parent e2257e9 commit de14015
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pynvjitlink/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION.
# Copyright (c) 2024-2025, NVIDIA CORPORATION.

import os

Expand Down
13 changes: 7 additions & 6 deletions pynvjitlink/tests/test_pynvjitlink.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions pynvjitlink/tests/test_pynvjitlink_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved.

import sys

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit de14015

Please sign in to comment.