Use KvikIO's implementation of file-backed memory mapping#19164
Merged
rapids-bot[bot] merged 16 commits intorapidsai:branch-25.10from Aug 25, 2025
Merged
Use KvikIO's implementation of file-backed memory mapping#19164rapids-bot[bot] merged 16 commits intorapidsai:branch-25.10from
rapids-bot[bot] merged 16 commits intorapidsai:branch-25.10from
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test 51ee3b2 |
Contributor
Author
|
/ok to test |
@kingcrimsontianyu, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
Contributor
Author
|
/ok to test bccb387 |
rapids-bot bot
pushed a commit
to rapidsai/kvikio
that referenced
this pull request
Jul 25, 2025
cuDF PR rapidsai/cudf#19164 currently has 4 failed unit tests when `LIBCUDF_MMAP_ENABLED=ON`: ``` 28 - CSV_TEST (Failed) 29 - ORC_TEST (Failed) 32 - JSON_TEST (Failed) 40 - DATA_CHUNK_SOURCE_TEST (Failed) ``` The fix entails code changes on both the KvikIO and cuDF sides. On the KvikIO side, the `MmapHandle::read()` and `MmapHandle::pread()` methods need to: - Allow the read size to be 0 - Allow `offset` to be equal to `initial_map_offset` (when the read size is 0) This PR makes this change. In addition, this PR adds more detailed error messages when out-of-range exception occurs. Authors: - Tianyu Liu (https://github.com/kingcrimsontianyu) Approvers: - Mads R. B. Kristensen (https://github.com/madsbk) URL: #781
vuule
approved these changes
Aug 21, 2025
Contributor
Author
|
/ok to test |
@kingcrimsontianyu, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
Contributor
Author
|
/ok to test 9a9a423 |
3 tasks
Contributor
Author
|
/ok to test 8938163 |
Contributor
Author
|
/ok to test e08a42a |
Contributor
Author
|
/merge |
galipremsagar
pushed a commit
to galipremsagar/cudf
that referenced
this pull request
Aug 27, 2025
…9164) ### Background Libcudf 25.04 and earlier use `memory_mapped_source` by default. For host read it uses memory mmaped I/O, and for device read it uses standard I/O. Libcudf 25.06 uses standard I/O by default. For host read, `memory_mapped_source` still uses memory mmaped I/O, while the device read is no longer allowed (runtime exception if used). Parquet/ORC readers fall back to the host read + H2D copy to emulate device read for the mapped source. ### This PR Now that the file-backed memory mapping (C++) is supported by KvikIO (rapidsai/kvikio#740), this PR updates libcudf to reinvigorate `memory_mapped_source` using KvikIO's implementation. This re-enables device read and brings performance improvement (e.g. through parallel prefault). ### Notes `memory_mapped_source` is an implementation detail in `datasource.cpp`. Currently testing was conducted on C2C (arm) and PCIe (x86) systems by manually setting `LIBCUDF_MMAP_ENABLED=ON` and running the tests. Refer to rapidsai/kvikio#530 (comment) for benchmark results. ### Dependency This PR depends on KvikIO PR rapidsai/kvikio#781 to fix unit test errors. Authors: - Tianyu Liu (https://github.com/kingcrimsontianyu) - Vukasin Milovanovic (https://github.com/vuule) Approvers: - Vukasin Milovanovic (https://github.com/vuule) URL: rapidsai#19164
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Background
Libcudf 25.04 and earlier use
memory_mapped_sourceby default. For host read it uses memory mmaped I/O, and for device read it uses standard I/O.Libcudf 25.06 uses standard I/O by default. For host read,
memory_mapped_sourcestill uses memory mmaped I/O, while the device read is no longer allowed (runtime exception if used). Parquet/ORC readers fall back to the host read + H2D copy to emulate device read for the mapped source.This PR
Now that the file-backed memory mapping (C++) is supported by KvikIO (rapidsai/kvikio#740), this PR updates libcudf to reinvigorate
memory_mapped_sourceusing KvikIO's implementation. This re-enables device read and brings performance improvement (e.g. through parallel prefault).Notes
memory_mapped_sourceis an implementation detail indatasource.cpp. Currently testing was conducted on C2C (arm) and PCIe (x86) systems by manually settingLIBCUDF_MMAP_ENABLED=ONand running the tests. Refer to rapidsai/kvikio#530 (comment) for benchmark results.Dependency
This PR depends on KvikIO PR rapidsai/kvikio#781 to fix unit test errors.
Checklist