Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -300,8 +310,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: [
Expand Down
Loading