Skip to content
37 changes: 18 additions & 19 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -120,30 +120,27 @@ if cuda_dep.found()
else
error('Unsupported CUDA version: ' + cuda_version_major)
endif

# DOCA GPUNETIO
nvcc_cmd = find_program('nvcc', required: false)
if nvcc_cmd.found()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we still need it?
on line 107 we use the same version comparision without nvcc_cmd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

if nvcc.version().version_compare('>=12.8') and nvcc.version().version_compare('<13.0')
doca_gpunetio_dep = dependency('doca-gpunetio', required : false)
else
warning('CUDA version = ' + nvcc.version() + ', GPUNETIO plugin will be disabled')
doca_gpunetio_dep = disabler()
endif
else
warning('nvcc not found, GPUNETIO plugin will be disabled')
doca_gpunetio_dep = disabler()
endif
else
warning('CUDA not found. UCX backend will be built without CUDA support, and some plugins will be disabled.')
doca_gpunetio_dep = disabler()
warning('CUDA not found, cannot autodetect wheel dir; defaulting to nixl_cu12')
cuda_wheel_dir = 'nixl_cu12'
endif

# DOCA GPUNETIO
if cuda_dep.found()
nvcc_cmd = find_program('nvcc', required: false)
if nvcc_cmd.found()
if nvcc_cmd.version().version_compare('>=12.8') and nvcc_cmd.version().version_compare('<13.0')
doca_gpunetio_dep = dependency('doca-gpunetio', required : false)
else
warning('CUDA version = ' + nvcc_cmd.version() + ', GPUNETIO plugin will be disabled')
doca_gpunetio_dep = disabler()
endif
else
warning('nvcc not found, GPUNETIO plugin will be disabled')
warning('CUDA not found, GPUNETIO plugin will be disabled')
doca_gpunetio_dep = disabler()
endif
else
warning('CUDA not found, GPUNETIO plugin will be disabled')
doca_gpunetio_dep = disabler()
endif

# Check for etcd-cpp-api - use multiple methods for discovery
Expand Down Expand Up @@ -213,10 +210,11 @@ nvcc_prog = find_program('nvcc', required: false)
ucx_gpu_device_api_available = false
if ucx_dep.found() and cuda_dep.found() and nvcc_prog.found()
cuda = meson.get_compiler('cuda')
# TODO: Expose doca_gpunetio_dep through UCX
have_gpu_side = cuda.compiles('''
#include <ucp/api/device/ucp_device_impl.h>
int main() { return 0; }
''', dependencies : ucx_dep, args: nvcc_flags)
''', dependencies : [ucx_dep, doca_gpunetio_dep], args: nvcc_flags)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add "TODO: expose gpunetIo dependency through ucx"
since for examaple, in theory ucx can be built without gpunetio and support only device api using cuda_ipc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added TODO


have_host_side = cpp.compiles('''
#include <ucp/api/device/ucp_host.h>
Expand All @@ -233,6 +231,7 @@ if ucx_dep.found() and cuda_dep.found() and nvcc_prog.found()
'GPU-side compile' : have_gpu_side,
'Host-side compile' : have_host_side,
'nvcc available' : nvcc_prog.found(),
'DOCA GPUNETIO found': doca_gpunetio_dep.found(),
}, section: 'UCX GPU Device API', bool_yn: true)
endif

Expand Down
2 changes: 1 addition & 1 deletion test/gtest/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ gtest_sources = [
if ucx_gpu_device_api_available
gtest_sources += device_api_test_sources
device_api_inc = [nixl_gpu_inc_dirs, include_directories('device_api')]
device_api_dep = ucx_dep
device_api_dep = [ucx_dep, doca_gpunetio_dep]
else
device_api_inc = []
device_api_dep = []
Expand Down