From 4dfc2da1f8307f1a899d7c8c7a0b2094d3e80e70 Mon Sep 17 00:00:00 2001 From: Edward Caunt Date: Tue, 20 Jan 2026 14:53:47 +0000 Subject: [PATCH] misc: Tweak importing of ctypes.utils in archinfo.py --- devito/arch/archinfo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devito/arch/archinfo.py b/devito/arch/archinfo.py index 88d1b3304c..2a5ecd8648 100644 --- a/devito/arch/archinfo.py +++ b/devito/arch/archinfo.py @@ -6,6 +6,7 @@ import re import sys from contextlib import suppress +from ctypes import util as ctypesutil from functools import cached_property from pathlib import Path from subprocess import DEVNULL, PIPE, CalledProcessError, Popen, run @@ -647,7 +648,7 @@ def get_m1_llvm_path(language): @memoized_func def check_cuda_runtime(): - libname = ctypes.util.find_library("cudart") + libname = ctypesutil.find_library("cudart") if not libname: warning("Unable to check compatibility of NVidia driver and runtime") return @@ -1109,7 +1110,7 @@ def max_shm_per_block(self): Get the maximum amount of shared memory per thread block """ # Load libcudart - libname = ctypes.util.find_library("cudart") + libname = ctypesutil.find_library("cudart") if not libname: return 64 * 1024 # 64 KB default lib = ctypes.CDLL(libname)