From 74725eab262f2a4858f1bd3291b37b8f6b8edd77 Mon Sep 17 00:00:00 2001 From: Stephen Huan Date: Sun, 5 Jul 2026 12:29:44 -0400 Subject: [PATCH 1/2] meson.build: unfold globs --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index ae80eb57..d7e00d99 100644 --- a/meson.build +++ b/meson.build @@ -300,8 +300,8 @@ if get_option('use_gpu') # In Meson, sources with a `.cu` extension are compiled with nvcc by default. # To compile `.c` files with nvcc, they must be explicitly targeted. # It is strongly recommended to rename CUDA-C files to `.cu`. - fs.glob('scs_source/linsys/gpu/*.c'), - fs.glob('scs_source/linsys/gpu/indirect/*.c'), + 'scs_source/linsys/gpu/gpu.c', + 'scs_source/linsys/gpu/indirect/private.c', c_args: gpu_c_args, dependencies: _deps, include_directories: [ From 8c6077e6e3566c48c116c2c82b9716262c86722e Mon Sep 17 00:00:00 2001 From: Stephen Huan Date: Sun, 5 Jul 2026 13:14:34 -0400 Subject: [PATCH 2/2] meson.build: add dependency on cublas and cusparse --- meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meson.build b/meson.build index d7e00d99..1d379461 100644 --- a/meson.build +++ b/meson.build @@ -288,6 +288,16 @@ endif if get_option('use_gpu') gpu_c_args = common_c_args + ['-DPY_GPU=1', '-DINDIRECT=1'] _deps += cuda_dep + cublas_dep = cc.find_library('cublas', required: false) + if not cublas_dep.found() + cublas_dep = dependency('cublas', required: true) + endif + _deps += cublas_dep + cusparse_dep = cc.find_library('cusparse', required: false) + if not cusparse_dep.found() + cusparse_dep = dependency('cusparse', required: true) + endif + _deps += cusparse_dep if get_option('gpu_atrans') gpu_c_args += '-DGPU_TRANSPOSE_MAT=1' endif