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

Control whether a file data source memory-maps the file with an environment variable #17004

Merged
merged 8 commits into from
Oct 18, 2024

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Oct 4, 2024

Description

Adds an environment variable, LIBCUDF_MMAP_ENABLED, to control whether we memory map the input file in the data source.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Oct 4, 2024
@vuule vuule self-assigned this Oct 4, 2024
@vuule vuule added feature request New feature or request cuIO cuIO issue non-breaking Non-breaking change labels Oct 4, 2024
@vuule vuule marked this pull request as ready for review October 7, 2024 22:06
@vuule vuule requested a review from a team as a code owner October 7, 2024 22:06
{
if (_map_addr == nullptr) { return false; }

auto const policy = getenv_or("LIBCUDF_MMAP_REGISTER_ENABLED", std::string{"AUTO"});
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a comment: In a future improvement, boolean type handling could be made more flexible by allowing both letter cases and supporting common key words such as "yes", "true", similar to what KvikIO does here.

@vuule vuule changed the title Environment variables to configure file data source Control whether a file data source memory maps the file with an environment variable Oct 17, 2024
@vuule vuule changed the title Control whether a file data source memory maps the file with an environment variable Control whether a file data source memory-maps the file with an environment variable Oct 17, 2024
@vuule
Copy link
Contributor Author

vuule commented Oct 17, 2024

Re-requested reviews because the scope changed (got smaller) since the PR was approved.

Copy link
Contributor

@kingcrimsontianyu kingcrimsontianyu left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@vuule
Copy link
Contributor Author

vuule commented Oct 18, 2024

/merge

@rapids-bot rapids-bot bot merged commit b891722 into rapidsai:branch-24.12 Oct 18, 2024
117 checks passed
@vuule vuule deleted the fea-mmap-env-vars branch October 18, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuIO cuIO issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants