Skip to content
23 changes: 4 additions & 19 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,8 @@ else
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 +196,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 +217,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