Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote IO: http support #464

Merged
merged 73 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a01dc53
Impl. basic remote handle
madsbk Sep 17, 2024
a6467d5
RemoteHandle::read()
madsbk Sep 18, 2024
127b782
ci: rangehttpserver
madsbk Sep 18, 2024
089397f
libcurl>=7.75.0 # Need <https://curl.se/libcurl/c/CURLOPT_AWS_SIGV4.…
madsbk Sep 18, 2024
5f1fca0
cmake
madsbk Sep 18, 2024
eaacacf
fix ci rangehttpserver
madsbk Sep 18, 2024
59595a8
cleanup
madsbk Sep 18, 2024
f803220
get_file_size(): check -1
madsbk Sep 18, 2024
dd06044
Read(): check file size
madsbk Sep 18, 2024
06dcb35
LibCurl get/set: use lock
madsbk Sep 19, 2024
7501600
test_no_range_support
madsbk Sep 19, 2024
7e6315e
bump libcurl>=7.87.0
madsbk Sep 19, 2024
4f9ab63
ci: more libcurl>=7.87.0
madsbk Sep 19, 2024
a20774c
cmake: CURL 7.87.0
madsbk Sep 19, 2024
43421ed
ci_debug
madsbk Sep 19, 2024
7df0e9f
CURLOPT_FOLLOWLOCATION
madsbk Sep 19, 2024
40b4be3
overflow_error
madsbk Sep 19, 2024
943e30b
RemoteEndpoint
madsbk Sep 20, 2024
e8f6b12
cpp_RemoteEndpoint
madsbk Sep 20, 2024
5f73677
from_http_url
madsbk Sep 20, 2024
5dbe2e5
Update cpp/include/kvikio/remote_handle.hpp
madsbk Sep 23, 2024
f9873c0
setopt(): use CURLoption
madsbk Sep 23, 2024
4896452
comment: need CURL_WRITEFUNC_ERROR
madsbk Sep 23, 2024
e53b761
LibCurl: use vector
madsbk Sep 23, 2024
4ba4eb4
UniqueHandlePtr
madsbk Sep 23, 2024
bf716be
get_handle() / retain_handle()
madsbk Sep 23, 2024
83774e3
clean up
madsbk Sep 23, 2024
e884d3c
doc
madsbk Sep 23, 2024
6637089
utils: LocalHttpServer
madsbk Sep 24, 2024
a0098e9
http benchmark
madsbk Sep 24, 2024
0e6dc7a
test_http_io
madsbk Sep 24, 2024
f0b2f9f
example
madsbk Sep 25, 2024
8e7e2cf
cleanup
madsbk Sep 26, 2024
fa67219
cmake: rapids_cpm_find CURL
madsbk Sep 29, 2024
9906a14
cleanup
madsbk Sep 30, 2024
d38121b
doc
madsbk Sep 30, 2024
bdc1e22
cleanup
madsbk Sep 30, 2024
51057f6
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Sep 30, 2024
383fa4c
clean up
madsbk Sep 30, 2024
0055373
docs
madsbk Sep 30, 2024
628e525
doc
madsbk Oct 1, 2024
8726f87
fix virtual dtor
madsbk Oct 1, 2024
3222c92
Merge branch 'branch-24.12' of https://github.com/rapidsai/kvikio int…
madsbk Oct 1, 2024
c94121d
fix benckmark
madsbk Oct 1, 2024
0c764ba
clean up
madsbk Oct 1, 2024
91d953b
libcurl.hpp
madsbk Oct 1, 2024
94e47ee
rename: RemoteFile.open_http
madsbk Oct 1, 2024
fcb9358
doc
madsbk Oct 1, 2024
e8018d1
cleanup
madsbk Oct 1, 2024
bb737b9
PushAndPopContext outside callback_device_memory()
madsbk Oct 1, 2024
f3f46f8
Merge branch 'branch-24.12' of https://github.com/rapidsai/kvikio int…
madsbk Oct 2, 2024
b8a9c0a
more nvtx
madsbk Oct 2, 2024
9cffe1c
Apply suggestions from code review
madsbk Oct 3, 2024
792f43f
Merge branch 'branch-24.12' of https://github.com/rapidsai/kvikio int…
madsbk Oct 3, 2024
1257a9f
std::function<decltype(curl_easy_cleanup)>
madsbk Oct 3, 2024
1006b24
getinfo: take output pointer
madsbk Oct 3, 2024
9ba9752
STATUS
madsbk Oct 3, 2024
128e3dd
close
madsbk Oct 3, 2024
0df1726
test_http_io: check is_remote_file_available
madsbk Oct 3, 2024
96af5ac
std::ptrdiff_t
madsbk Oct 3, 2024
feccdd9
Apply suggestions from code review
madsbk Oct 3, 2024
119c025
Merge branch 'remote-io' of github.com:madsbk/kvikio into remote-io
madsbk Oct 3, 2024
7dcc8f3
use conda's rangehttpserver
madsbk Oct 3, 2024
60f7331
doc
madsbk Oct 3, 2024
13e0b7a
CallbackContext ctor
madsbk Oct 3, 2024
474e694
host: libcurl==7.87.0
madsbk Oct 3, 2024
9022b18
run: remove libcurl>=7.87.0
madsbk Oct 3, 2024
8bbb33b
curl-7_87_0
madsbk Oct 3, 2024
46b9300
Merge branch 'branch-24.12' of https://github.com/rapidsai/kvikio int…
madsbk Oct 3, 2024
1176b67
kvikio/meta.yaml: libcurl==7.87.0
madsbk Oct 3, 2024
4ed88a2
Merge branch 'branch-24.12' of https://github.com/rapidsai/kvikio int…
madsbk Oct 3, 2024
cc7b291
Merge branch 'branch-24.12' of https://github.com/rapidsai/kvikio int…
madsbk Oct 7, 2024
58e3054
cmake clean up
madsbk Oct 7, 2024
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
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
- dask>=2022.05.2
- doxygen=1.9.1
- gcc_linux-aarch64=11.*
- libcurl>=7.87.0
- ninja
- numcodecs !=0.12.0
- numpy>=1.23,<3.0a0
Expand All @@ -28,6 +29,7 @@ dependencies:
- pytest
- pytest-cov
- python>=3.10,<3.13
- rangehttpserver
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- scikit-build-core>=0.10.0
- sphinx
Expand Down
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies:
- gcc_linux-64=11.*
- libcufile-dev=1.4.0.31
- libcufile=1.4.0.31
- libcurl>=7.87.0
- ninja
- numcodecs !=0.12.0
- numpy>=1.23,<3.0a0
Expand All @@ -30,6 +31,7 @@ dependencies:
- pytest
- pytest-cov
- python>=3.10,<3.13
- rangehttpserver
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- scikit-build-core>=0.10.0
- sphinx
Expand Down
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-125_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- doxygen=1.9.1
- gcc_linux-aarch64=11.*
- libcufile-dev
- libcurl>=7.87.0
- ninja
- numcodecs !=0.12.0
- numpy>=1.23,<3.0a0
Expand All @@ -28,6 +29,7 @@ dependencies:
- pytest
- pytest-cov
- python>=3.10,<3.13
- rangehttpserver
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- scikit-build-core>=0.10.0
- sphinx
Expand Down
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- doxygen=1.9.1
- gcc_linux-64=11.*
- libcufile-dev
- libcurl>=7.87.0
- ninja
- numcodecs !=0.12.0
- numpy>=1.23,<3.0a0
Expand All @@ -28,6 +29,7 @@ dependencies:
- pytest
- pytest-cov
- python>=3.10,<3.13
- rangehttpserver
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- scikit-build-core>=0.10.0
- sphinx
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/kvikio/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ requirements:
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- scikit-build-core >=0.10.0
- libkvikio ={{ version }}
- libcurl==7.87.0
run:
- python
- numpy >=1.23,<3.0a0
Expand Down
2 changes: 2 additions & 0 deletions conda/recipes/libkvikio/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ requirements:
{% else %}
- libcufile-dev # [linux]
{% endif %}
- libcurl==7.87.0

outputs:
- name: libkvikio
Expand All @@ -74,6 +75,7 @@ outputs:
- cmake {{ cmake_version }}
host:
- cuda-version ={{ cuda_version }}
- libcurl==7.87.0
run:
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
{% if cuda_major == "11" %}
Expand Down
15 changes: 15 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ rapids_cmake_write_version_file(include/kvikio/version_config.hpp)
rapids_cmake_build_type(Release)

# build options
option(KvikIO_REMOTE_SUPPORT "Configure CMake to build with remote IO support" ON)
option(KvikIO_BUILD_EXAMPLES "Configure CMake to build examples" ON)
option(KvikIO_BUILD_TESTS "Configure CMake to build tests" ON)

Expand All @@ -50,6 +51,10 @@ rapids_find_package(
INSTALL_EXPORT_SET kvikio-exports
)

if(KvikIO_REMOTE_SUPPORT)
include(cmake/thirdparty/get_libcurl.cmake)
endif()

rapids_find_package(
CUDAToolkit
BUILD_EXPORT_SET kvikio-exports
Expand Down Expand Up @@ -138,6 +143,10 @@ target_link_libraries(
kvikio INTERFACE Threads::Threads BS::thread_pool ${CMAKE_DL_LIBS}
$<TARGET_NAME_IF_EXISTS:nvtx3::nvtx3-cpp>
)
if(TARGET CURL::libcurl)
target_link_libraries(kvikio INTERFACE $<BUILD_LOCAL_INTERFACE:CURL::libcurl>)
target_compile_definitions(kvikio INTERFACE $<BUILD_LOCAL_INTERFACE:KVIKIO_LIBCURL_FOUND>)
endif()
target_compile_features(kvikio INTERFACE cxx_std_17)

# optionally build examples
Expand Down Expand Up @@ -231,6 +240,12 @@ if(NOT already_set_kvikio)
target_compile_definitions(kvikio::kvikio INTERFACE KVIKIO_CUFILE_STREAM_API_FOUND)
endif()
endif()

if(TARGET CURL::libcurl)
target_link_libraries(kvikio::kvikio INTERFACE CURL::libcurl)
target_compile_definitions(kvikio::kvikio INTERFACE KVIKIO_LIBCURL_FOUND)
endif()

endif()
]=]
)
Expand Down
32 changes: 32 additions & 0 deletions cpp/cmake/thirdparty/get_libcurl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# =============================================================================
# Copyright (c) 2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================

# This function finds libcurl and sets any additional necessary environment variables.
function(find_and_configure_libcurl)
include(${rapids-cmake-dir}/cpm/find.cmake)

rapids_cpm_find(
CURL 7.87.0
GLOBAL_TARGETS libcurl
BUILD_EXPORT_SET kvikio-exports
INSTALL_EXPORT_SET kvikio-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/curl/curl
GIT_TAG curl-7_87_0
OPTIONS "BUILD_CURL_EXE OFF" "BUILD_SHARED_LIBS OFF" "BUILD_TESTING OFF" "CURL_USE_LIBPSL OFF"
"CURL_DISABLE_LDAP ON" "CMAKE_POSITION_INDEPENDENT_CODE ON"
)
endfunction()

find_and_configure_libcurl()
Loading