Skip to content

Commit 4dfc2da

Browse files
committed
misc: Tweak importing of ctypes.utils in archinfo.py
1 parent ca12d81 commit 4dfc2da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

devito/arch/archinfo.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import re
77
import sys
88
from contextlib import suppress
9+
from ctypes import util as ctypesutil
910
from functools import cached_property
1011
from pathlib import Path
1112
from subprocess import DEVNULL, PIPE, CalledProcessError, Popen, run
@@ -647,7 +648,7 @@ def get_m1_llvm_path(language):
647648

648649
@memoized_func
649650
def check_cuda_runtime():
650-
libname = ctypes.util.find_library("cudart")
651+
libname = ctypesutil.find_library("cudart")
651652
if not libname:
652653
warning("Unable to check compatibility of NVidia driver and runtime")
653654
return
@@ -1109,7 +1110,7 @@ def max_shm_per_block(self):
11091110
Get the maximum amount of shared memory per thread block
11101111
"""
11111112
# Load libcudart
1112-
libname = ctypes.util.find_library("cudart")
1113+
libname = ctypesutil.find_library("cudart")
11131114
if not libname:
11141115
return 64 * 1024 # 64 KB default
11151116
lib = ctypes.CDLL(libname)

0 commit comments

Comments
 (0)