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

S3 support #426

Draft
wants to merge 101 commits into
base: branch-24.10
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
32130c2
clean up
madsbk Jul 30, 2024
4a5884c
benchmark: use cudf.set_option
madsbk Aug 13, 2024
804fd99
revert some minor changes
madsbk Aug 13, 2024
bbbe637
doc
madsbk Aug 13, 2024
a752eee
doc
madsbk Aug 13, 2024
ce4218a
doc
madsbk Aug 13, 2024
5ba191d
doc
madsbk Aug 13, 2024
5126b44
--bundled-server-lifetime
madsbk Aug 13, 2024
185e687
clean up
madsbk Aug 13, 2024
502f7cf
doc
madsbk Aug 13, 2024
740a15d
cleanup
madsbk Aug 13, 2024
7fbabdf
doc
madsbk Aug 13, 2024
5b41e74
doc
madsbk Aug 13, 2024
555903d
doc
madsbk Aug 16, 2024
69f7fd9
Re-run CI
KyleFromNVIDIA Aug 16, 2024
39ca408
Fix CMake code
KyleFromNVIDIA Aug 16, 2024
cce5b1b
Merge branch 'branch-24.10' into s3_support
KyleFromNVIDIA Aug 16, 2024
1c601ad
Style
KyleFromNVIDIA Aug 16, 2024
551fe20
Install moto server support for testing
KyleFromNVIDIA Aug 16, 2024
b0ff3d1
Install cudf for testing
KyleFromNVIDIA Aug 16, 2024
afb2dae
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Aug 19, 2024
06c0311
doc
madsbk Aug 19, 2024
504f15d
Temporarily remove cudf test dependency
KyleFromNVIDIA Aug 19, 2024
2de3486
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Aug 20, 2024
5f07f2e
test: import boto3 and moto
madsbk Aug 20, 2024
f391ad1
cleanup
madsbk Aug 20, 2024
247ab4d
clean up
madsbk Aug 20, 2024
9adffc1
Apply suggestions from code review
madsbk Aug 20, 2024
8b4436d
client(): not shared pointer
madsbk Aug 20, 2024
2287c9b
Merge branch 's3_support' of github.com:madsbk/kvikio into s3_support
madsbk Aug 20, 2024
e830f62
style
madsbk Aug 20, 2024
bff52a4
S3Context::get_file_size
madsbk Aug 20, 2024
f6e7ebc
move S3Context out of detail
madsbk Aug 20, 2024
3f8291a
cpp_RemoteHandle
madsbk Aug 21, 2024
2607ca1
_get_remote_module
madsbk Aug 21, 2024
6f3c25d
make S3Context public
madsbk Aug 21, 2024
149d6be
call Aws::ShutdownAPI()
madsbk Aug 21, 2024
98991b3
clean up
madsbk Aug 21, 2024
daac52f
doc
madsbk Aug 21, 2024
ba6925c
doc
madsbk Aug 21, 2024
c635519
S3Context: endpoint_override
madsbk Aug 22, 2024
b8bfef2
examples/aws_s3.py
madsbk Aug 22, 2024
4c4b36e
doc
madsbk Aug 22, 2024
e489bbe
doc
madsbk Aug 22, 2024
73d9104
RemoteHandle: no default ctor
madsbk Aug 22, 2024
b4ac1d7
cleanup
madsbk Aug 22, 2024
d9ba372
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Aug 22, 2024
146efc0
KVIKIO_AWS_SDK_FOUND
madsbk Aug 22, 2024
b19a146
cmake: --no-s3
madsbk Aug 23, 2024
4cb54a9
move KVIKIO_AWS_SDK_FOUND up before aws include
madsbk Aug 23, 2024
379f521
parse_s3_path tests
madsbk Aug 23, 2024
8849d11
S3Context::client(): mark const
madsbk Aug 23, 2024
8c54a6c
east const
madsbk Aug 23, 2024
bb0ad24
typo
madsbk Aug 23, 2024
33b9227
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Aug 23, 2024
2e5ff0b
aws-sdk-cpp>=1.11.267, we need <https://github.com/aws/aws-sdk-cpp/pu…
madsbk Aug 23, 2024
378e9b6
doc
madsbk Aug 23, 2024
496fe8d
doc
madsbk Aug 23, 2024
ea2d93c
CI: disable devcontainer until #446 has been fixed.
madsbk Aug 23, 2024
3bb3ce1
yaml: remove some aws-sdk-cpp
madsbk Aug 26, 2024
b9b2c44
ci: comment out devcontainer
madsbk Aug 26, 2024
fa4f298
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Aug 27, 2024
c483b68
AllocRetain::ensure_alloc_size()
madsbk Aug 27, 2024
ce0c59a
add task_size argument
madsbk Aug 27, 2024
bbb4042
harmonic_mean
madsbk Aug 28, 2024
f363f15
use MonkeyPatch
madsbk Aug 28, 2024
8129d17
Apply suggestions from code review
madsbk Aug 28, 2024
37b294c
Merge branch 's3_support' of github.com:madsbk/kvikio into s3_support
madsbk Aug 28, 2024
fb95490
doc
madsbk Aug 28, 2024
2729dbf
test: 10mins timeout
madsbk Aug 28, 2024
ce08365
doc
madsbk Aug 28, 2024
e800233
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Aug 28, 2024
a60011a
Get aws-sdk-cpp through CPM
KyleFromNVIDIA Aug 28, 2024
0d68e49
Enable devcontainers
KyleFromNVIDIA Aug 28, 2024
72812cc
Formatting
KyleFromNVIDIA Aug 28, 2024
c4ccd9e
pr-builder
KyleFromNVIDIA Aug 28, 2024
4f765d0
Style
KyleFromNVIDIA Aug 28, 2024
355d192
Argument ordering
KyleFromNVIDIA Aug 28, 2024
500681a
Style
KyleFromNVIDIA Aug 28, 2024
d2a49c9
Relax aws-sdk-cpp version
KyleFromNVIDIA Aug 28, 2024
bd83655
Find debug
KyleFromNVIDIA Aug 29, 2024
2687cc6
CPM_USE_LOCAL_PACKAGES
KyleFromNVIDIA Aug 29, 2024
8fe82b9
No debug find
KyleFromNVIDIA Aug 29, 2024
fdb9a59
Fix AWS linking
KyleFromNVIDIA Aug 29, 2024
4e4389f
Re-run CI
KyleFromNVIDIA Aug 29, 2024
cebc0a8
Install libcurl4-openssl-dev for pip devcontainers
KyleFromNVIDIA Aug 29, 2024
61a5d50
Link against aws-cpp-sdk-core
KyleFromNVIDIA Aug 29, 2024
d55030a
Try excluding curl
KyleFromNVIDIA Aug 29, 2024
2123666
Style
KyleFromNVIDIA Aug 29, 2024
0c2f09b
Merge branch 'branch-24.10' into s3_support
KyleFromNVIDIA Aug 30, 2024
bb445a3
Try AWS's HTTP client
KyleFromNVIDIA Aug 30, 2024
4701b52
No need to install libcurl
KyleFromNVIDIA Aug 30, 2024
2bd411e
libcudf_s3_io
madsbk Sep 3, 2024
b40a0ad
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Sep 3, 2024
7bcfe5b
Merge branch 'branch-24.10' into s3_support
madsbk Sep 4, 2024
2a9f934
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
madsbk Sep 6, 2024
b978323
test: ignore deprecation warning
madsbk Sep 6, 2024
00304e7
test: remove the kvikio._lib.remote_handle trigger
madsbk Sep 6, 2024
f9b49f2
Revert "test: ignore deprecation warning"
madsbk Sep 6, 2024
0403686
pytest: ignore deprecation warning in botocore
madsbk Sep 6, 2024
0001265
Apply suggestions from code review
madsbk Sep 9, 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
3 changes: 3 additions & 0 deletions conda/environments/all_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ channels:
- conda-forge
- nvidia
dependencies:
- aws-sdk-cpp
- boto3>=1.21.21
- c-compiler
- cmake>=3.26.4,!=3.30.0
- cuda-python>=11.7.1,<12.0a0
Expand All @@ -17,6 +19,7 @@ dependencies:
- dask>=2022.05.2
- doxygen=1.9.1
- gcc_linux-aarch64=11.*
- moto>=4.0.8
- ninja
- numcodecs <0.12.0
- numpy>=1.23,<2.0a0
Expand Down
3 changes: 3 additions & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ channels:
- conda-forge
- nvidia
dependencies:
- aws-sdk-cpp
- boto3>=1.21.21
- c-compiler
- cmake>=3.26.4,!=3.30.0
- cuda-python>=11.7.1,<12.0a0
Expand All @@ -19,6 +21,7 @@ dependencies:
- gcc_linux-64=11.*
- libcufile-dev=1.4.0.31
- libcufile=1.4.0.31
- moto>=4.0.8
- ninja
- numcodecs <0.12.0
- numpy>=1.23,<2.0a0
Expand Down
3 changes: 3 additions & 0 deletions conda/environments/all_cuda-125_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ channels:
- conda-forge
- nvidia
dependencies:
- aws-sdk-cpp
- boto3>=1.21.21
- c-compiler
- cmake>=3.26.4,!=3.30.0
- cuda-nvcc
Expand All @@ -18,6 +20,7 @@ dependencies:
- doxygen=1.9.1
- gcc_linux-aarch64=11.*
- libcufile-dev
- moto>=4.0.8
- ninja
- numcodecs <0.12.0
- numpy>=1.23,<2.0a0
Expand Down
3 changes: 3 additions & 0 deletions conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ channels:
- conda-forge
- nvidia
dependencies:
- aws-sdk-cpp
- boto3>=1.21.21
- c-compiler
- cmake>=3.26.4,!=3.30.0
- cuda-nvcc
Expand All @@ -18,6 +20,7 @@ dependencies:
- doxygen=1.9.1
- gcc_linux-64=11.*
- libcufile-dev
- moto>=4.0.8
- ninja
- numcodecs <0.12.0
- numpy>=1.23,<2.0a0
Expand Down
3 changes: 3 additions & 0 deletions conda/recipes/kvikio/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ requirements:
- {{ compiler('cuda') }}
{% endif %}
- {{ stdlib("c") }}
- aws-sdk-cpp
host:
- python
- pip
Expand All @@ -64,11 +65,13 @@ requirements:
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- scikit-build-core >=0.10.0
- libkvikio ={{ version }}
- aws-sdk-cpp
run:
- python
- numpy >=1.23,<2.0a0
- cupy >=12.0.0
- zarr
- aws-sdk-cpp
# See https://github.com/zarr-developers/numcodecs/pull/475
- numcodecs <0.12.0
- packaging
Expand Down
8 changes: 8 additions & 0 deletions conda/recipes/libkvikio/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ requirements:
{% endif %}
- ninja
- {{ stdlib("c") }}
- aws-sdk-cpp
madsbk marked this conversation as resolved.
Show resolved Hide resolved
host:
- cuda-version ={{ cuda_version }}
{% if cuda_major == "11" %}
Expand All @@ -52,6 +53,7 @@ requirements:
{% else %}
- libcufile-dev # [linux]
{% endif %}
- aws-sdk-cpp

outputs:
- name: libkvikio
Expand All @@ -72,8 +74,10 @@ outputs:
requirements:
build:
- cmake {{ cmake_version }}
- aws-sdk-cpp
madsbk marked this conversation as resolved.
Show resolved Hide resolved
host:
- cuda-version ={{ cuda_version }}
- aws-sdk-cpp
madsbk marked this conversation as resolved.
Show resolved Hide resolved
run:
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
{% if cuda_major == "11" %}
Expand All @@ -83,6 +87,7 @@ outputs:
{% else %}
- libcufile-dev # [linux]
{% endif %}
- aws-sdk-cpp
test:
commands:
- test -f $PREFIX/include/kvikio/file_handle.hpp
Expand All @@ -106,6 +111,7 @@ outputs:
- cuda-cudart-dev
- libcufile-dev # [linux]
{% endif %}
- aws-sdk-cpp
requirements:
build:
- cmake {{ cmake_version }}
Expand All @@ -118,6 +124,7 @@ outputs:
- cuda-cudart-dev
- libcufile-dev # [linux]
{% endif %}
- aws-sdk-cpp
run:
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
{% if cuda_major == "11" %}
Expand All @@ -127,6 +134,7 @@ outputs:
- cuda-cudart
- libcufile # [linux]
{% endif %}
- aws-sdk-cpp
about:
home: https://rapids.ai
license: Apache-2.0
Expand Down
7 changes: 7 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ rapids_find_package(
INSTALL_EXPORT_SET kvikio-exports
)

rapids_find_package(
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Perhaps not for this prototype, but if it is easy, perhaps yes.

Should building S3 support be a user-configurable option. That is, even if we can find the package, should we have an option (say -DKVIKIO_HAVE_S3_SUPPORT=1) to cmake so that the user can compile without this dependency if they are only doing local I/O?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done

AWSSDK COMPONENTS s3
BUILD_EXPORT_SET kvikio-exports
INSTALL_EXPORT_SET kvikio-exports
)

rapids_find_package(
cuFile
BUILD_EXPORT_SET kvikio-exports
Expand Down Expand Up @@ -130,6 +136,7 @@ target_include_directories(
)
target_link_libraries(
kvikio INTERFACE Threads::Threads ${CMAKE_DL_LIBS} nvtx3::nvtx3-cpp BS::thread_pool
${AWSSDK_LINK_LIBRARIES}
)
target_compile_features(kvikio INTERFACE cxx_std_17)

Expand Down
4 changes: 4 additions & 0 deletions cpp/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

set(TEST_INSTALL_PATH bin/tests/libkvikio)

# Example: basic_io

if(CUDAToolkit_FOUND)
add_executable(BASIC_IO_TEST basic_io.cpp)
set_target_properties(BASIC_IO_TEST PROPERTIES INSTALL_RPATH "\$ORIGIN/../../lib")
Expand All @@ -35,6 +37,8 @@ else()
message(STATUS "Cannot build the basic_io example when CUDA is not found")
endif()

# Example: basic_no_cuda

add_executable(BASIC_NO_CUDA_TEST basic_no_cuda.cpp)
set_target_properties(BASIC_NO_CUDA_TEST PROPERTIES INSTALL_RPATH "\$ORIGIN/../../lib")
target_include_directories(BASIC_NO_CUDA_TEST PRIVATE ../include)
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/kvikio/file_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class FileHandle {
*
* @return The number of bytes
*/
[[nodiscard]] inline std::size_t nbytes() const
[[nodiscard]] std::size_t nbytes() const
wence- marked this conversation as resolved.
Show resolved Hide resolved
{
if (closed()) { return 0; }
if (_nbytes == 0) { _nbytes = detail::get_file_size(_fd_direct_off); }
Expand Down
Loading
Loading