From 4a24743a54c2a833a21f52851af9a7a72c0c79d1 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 9 Dec 2025 08:47:05 -0800 Subject: [PATCH 1/3] Remove `E722` from `[lint.per-file-ignores]` in ruff.toml --- ruff.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ruff.toml b/ruff.toml index 6312d3e9ef..beef9d07e0 100644 --- a/ruff.toml +++ b/ruff.toml @@ -50,19 +50,16 @@ exclude = ["**/_version.py"] "setup.py" = ["F401"] "cuda_bindings/examples/**" = [ - "E722", "E501", # line too long ] "cuda_bindings/tests/**" = [ - "E722", "UP022", "E402", # module level import not at top of file "F841", ] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example) "cuda_bindings/benchmarks/**" = [ - "E722", "UP022", "E402", # module level import not at top of file "F841", From 1990d772aeb175ccb62ae718dbf6169e23974f08 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 9 Dec 2025 08:55:31 -0800 Subject: [PATCH 2/3] =?UTF-8?q?Replace=20bare=20except=20=E2=86=92=20cufil?= =?UTF-8?q?e.cuFileError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cuda_bindings/tests/test_cufile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_bindings/tests/test_cufile.py b/cuda_bindings/tests/test_cufile.py index 4c5826a865..ff8bfef721 100644 --- a/cuda_bindings/tests/test_cufile.py +++ b/cuda_bindings/tests/test_cufile.py @@ -1468,7 +1468,7 @@ def test_param(param, val, default_val): try: # Currently this line will raise, see below. cufile.set_parameter_string(param, int(ctypes.addressof(orig_val_buf))) - except: + except cufile.cuFileError: # This block will always be reached because cuFILE could start with garbage default (empty string) # that cannot be restored. In other words, cuFILE does honor the common sense that getter/setter # should be round-tripable. From 12b47147a68e03eacdf5b829afb1ebef9e3a094c Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 9 Dec 2025 08:49:26 -0800 Subject: [PATCH 3/3] cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py: remove skipif entirely to see what errors we get --- .../3_CUDA_Features/simpleCudaGraphs_test.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py b/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py index ff561aca8f..7012fc6719 100644 --- a/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py +++ b/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py @@ -5,7 +5,6 @@ import random as rnd import numpy as np -import pytest from common import common from common.helper_cuda import checkCudaErrors, findCudaDevice from cuda.bindings import driver as cuda @@ -362,23 +361,6 @@ def cudaGraphsUsingStreamCapture(inputVec_h, inputVec_d, outputVec_d, result_d, checkCudaErrors(cudart.cudaStreamDestroy(streamForGraph)) -def checkKernelCompiles(): - kernel_headers = """\ - #include - """ - try: - common.KernelHelper(kernel_headers, findCudaDevice()) - except: - # Filters out test from automation when CG header has issues compiling - # Automation issue is observed when CG headers are obtained through PYPI packages - # The problem is that these headers and their dependencies are segmented between - # multiple packages, and NVRTC requires that you specify the path to each segemented - # include path. - return False - return True - - -@pytest.mark.skipif(not checkKernelCompiles(), reason="Automation filter against incompatible kernel") def main(): size = 1 << 24 # number of elements to reduce maxBlocks = 512