Skip to content

Commit bced7d8

Browse files
committed
Added posix plugin
1 parent 969dcd5 commit bced7d8

15 files changed

+1142
-2
lines changed

.gitlab/build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ apt-get -qq install -y curl \
5353
libgrpc-dev \
5454
libgrpc++-dev \
5555
libprotobuf-dev \
56+
liburing-dev \
5657
meson \
5758
ninja-build \
5859
pkg-config \

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ NVIDIA Inference Xfer Library (NIXL) is targeted for accelerating point to point
2626
### Ubuntu:
2727

2828
`$ sudo apt install build-essential cmake pkg-config`
29+
`$ sudo apt install liburing-dev`
2930

3031
### Fedora:
3132

3233
`$ sudo dnf install gcc-c++ cmake pkg-config`
34+
`$ sudo dnf install liburing-devel`
3335

3436
### Python
3537

contrib/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ RUN apt-get update -y && \
2727
libclang-dev \
2828
cmake
2929

30+
RUN apt install liburing-dev
31+
3032
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
3133

3234
ENV RUSTUP_HOME=/usr/local/rustup \

src/core/nixl_plugin_manager.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -387,5 +387,10 @@ void nixlPluginManager::registerBuiltinPlugins() {
387387
extern nixlBackendPlugin* createStaticGdsPlugin();
388388
registerStaticPlugin("GDS", createStaticGdsPlugin);
389389
#endif
390+
391+
#ifdef STATIC_PLUGIN_POSIX
392+
extern nixlBackendPlugin* createStaticPosixPlugin();
393+
registerStaticPlugin("POSIX", createStaticPosixPlugin);
394+
#endif
390395
#endif
391396
}

src/plugins/meson.build

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ucx_backend_inc_dirs = include_directories('./ucx')
1717

1818
subdir('ucx')
1919
subdir('ucx_mo')
20+
subdir('posix')
2021

2122
disable_gds_backend = get_option('disable_gds_backend')
2223
if not disable_gds_backend and cuda_dep.found()

src/plugins/posix/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
# NIXL POSIX Plugin
19+
20+
This plugin uses liburing as an I/O backend for NIXL.
21+
22+
# Install
23+
sudo apt install liburing-dev

src/plugins/posix/meson.build

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Check for liburing dependency
17+
liburing_dep = dependency('liburing', required: true)
18+
19+
# Get Abseil dependencies
20+
absl_log_dep = dependency('absl_log', required: true)
21+
22+
if 'POSIX' in static_plugins
23+
posix_backend_lib = static_library('POSIX', 'posix_backend.cpp', 'posix_backend.h', 'posix_plugin.cpp',
24+
dependencies: [nixl_infra, liburing_dep, absl_log_dep],
25+
link_args: ['-luring'],
26+
include_directories: [nixl_inc_dirs, utils_inc_dirs],
27+
install: false,
28+
cpp_args: compile_flags,
29+
name_prefix: 'libplugin_') # Custom prefix for plugin libraries
30+
else
31+
posix_backend_lib = shared_library('POSIX', 'posix_backend.cpp', 'posix_backend.h', 'posix_plugin.cpp',
32+
dependencies: [nixl_infra, liburing_dep, absl_log_dep],
33+
include_directories: [nixl_inc_dirs, utils_inc_dirs],
34+
link_args: ['-luring'],
35+
install: true,
36+
cpp_args: ['-fPIC'],
37+
name_prefix: 'libplugin_', # Custom prefix for plugin libraries
38+
install_dir: plugin_install_dir)
39+
if get_option('buildtype') == 'debug'
40+
run_command('sh', '-c',
41+
'echo "POSIX=' + posix_backend_lib.full_path() + '" >> ' + plugin_build_dir + '/pluginlist',
42+
check: true
43+
)
44+
endif
45+
endif
46+
47+
posix_backend_interface = declare_dependency(link_with: posix_backend_lib)

0 commit comments

Comments
 (0)