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

Fix host buffer access from device function in the Parquet reader #14328

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Oct 25, 2023

Description

Closes #14311
The host access becomes an issue when pageable memory is used for host side of hostdevice_vector.
This PR fixes the device lambda to use the device pointer instead.

Checklist

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

@vuule vuule self-assigned this Oct 25, 2023
@vuule vuule added bug Something isn't working cuIO cuIO issue non-breaking Non-breaking change labels Oct 25, 2023
@github-actions github-actions bot added libcudf Affects libcudf (C++/CUDA) code. and removed bug Something isn't working cuIO cuIO issue non-breaking Non-breaking change labels Oct 25, 2023
@vuule vuule added bug Something isn't working cuIO cuIO issue non-breaking Non-breaking change labels Oct 25, 2023
@vuule vuule marked this pull request as ready for review October 25, 2023 21:10
@vuule vuule requested a review from a team as a code owner October 25, 2023 21:10
@vuule vuule requested review from vyasr and shrshi October 25, 2023 21:10
Copy link
Contributor

@shrshi shrshi 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, thank you!

@vuule vuule added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Oct 26, 2023
Copy link
Contributor

@ttnghia ttnghia left a comment

Choose a reason for hiding this comment

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

Is there any test for the related function? If yes, how this didn't crash the test?

@vuule
Copy link
Contributor Author

vuule commented Oct 27, 2023

Is there any test for the related function? If yes, how this didn't crash the test?

The use of pinned memory was hiding the issue. When using pageable memory in hostdevice_vectors, all of the Parquet reader tests crash.

@ttnghia
Copy link
Contributor

ttnghia commented Oct 27, 2023

The use of pinned memory was hiding the issue. When using pageable memory in hostdevice_vectors, all of the Parquet reader tests crash.

Then can we have a test with both pinned memory/pageable memory? Such as through macro definition or toggling the corresponding env variable?

@vuule
Copy link
Contributor Author

vuule commented Oct 27, 2023

The use of pinned memory was hiding the issue. When using pageable memory in hostdevice_vectors, all of the Parquet reader tests crash.

Then can we have a test with both pinned memory/pageable memory? Such as through macro definition or toggling the corresponding env variable?

I've started working on the test and realized some problems. The env var is read only once and cached. We can't enable pageable memory use for only one test.
We would also need separate tests for each format.
I don't think we should be adding tests for this at this time. Maybe if/when the option gets some use.

@vuule
Copy link
Contributor Author

vuule commented Oct 27, 2023

/merge

@rapids-bot rapids-bot bot merged commit 9354fb5 into rapidsai:branch-23.12 Oct 27, 2023
57 checks passed
@vuule
Copy link
Contributor Author

vuule commented Oct 27, 2023

Merged to enable spark experiments; we can add tests in a separate PR.

@vuule vuule deleted the bug-read_parquet-host-access-from-device branch October 27, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] LIBCUDF_IO_PREFER_PAGEABLE_TMP_MEMORY=1 causes cudaErrorIllegalAddress in parquet reads
4 participants