From a38958c2164ffbecf1dd33c4ad918847606e3303 Mon Sep 17 00:00:00 2001 From: Yixiang Gao Date: Sun, 17 Dec 2023 17:12:02 -0600 Subject: [PATCH] fix CI --- generate_cuda.sh | 1 + gpuctypes/cuda.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/generate_cuda.sh b/generate_cuda.sh index 5f3e515..d29b4a5 100755 --- a/generate_cuda.sh +++ b/generate_cuda.sh @@ -3,4 +3,5 @@ clang2py /usr/include/cuda.h /usr/include/nvrtc.h -o gpuctypes/cuda.py -l /usr/l sed -i "s\import ctypes\import ctypes, ctypes.util\g" gpuctypes/cuda.py sed -i "s\ctypes.CDLL('/usr/lib/x86_64-linux-gnu/libcuda.so')\ctypes.CDLL(ctypes.util.find_library('cuda'))\g" gpuctypes/cuda.py sed -i "s\ctypes.CDLL('/usr/lib/x86_64-linux-gnu/libnvrtc.so')\ctypes.CDLL(ctypes.util.find_library('nvrtc'))\g" gpuctypes/cuda.py +echo -e "from gpuctypes.check_cuda import is_cuda_available\nis_cuda_available()\n$(cat gpuctypes/cuda.py)" > gpuctypes/cuda.py grep FIXME_STUB gpuctypes/cuda.py || true diff --git a/gpuctypes/cuda.py b/gpuctypes/cuda.py index 383a3b0..8f690ce 100644 --- a/gpuctypes/cuda.py +++ b/gpuctypes/cuda.py @@ -1,3 +1,5 @@ +from gpuctypes.check_cuda import is_cuda_available +is_cuda_available() # -*- coding: utf-8 -*- # # TARGET arch is: [] @@ -6,8 +8,6 @@ # LONGDOUBLE_SIZE is: 16 # import ctypes, ctypes.util -from gpuctypes.check_cuda import is_cuda_available -is_cuda_available() class AsDictMixin: @classmethod