Skip to content

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

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:branch-23.12from
vuule:bug-read_parquet-host-access-from-device
Oct 27, 2023
Merged

Fix host buffer access from device function in the Parquet reader#14328
rapids-bot[bot] merged 4 commits into
NVIDIA:branch-23.12from
vuule:bug-read_parquet-host-access-from-device

Conversation

@vuule

@vuule vuule commented Oct 25, 2023

Copy link
Copy Markdown
Contributor

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 shrshi and vyasr October 25, 2023 21:10

@shrshi shrshi left a comment

Copy link
Copy Markdown
Contributor

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

@ttnghia ttnghia left a comment

Copy link
Copy Markdown
Contributor

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

vuule commented Oct 27, 2023

Copy link
Copy Markdown
Contributor Author

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

ttnghia commented Oct 27, 2023

Copy link
Copy Markdown
Contributor

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

vuule commented Oct 27, 2023

Copy link
Copy Markdown
Contributor Author

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

vuule commented Oct 27, 2023

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 9354fb5 into NVIDIA:branch-23.12 Oct 27, 2023
@vuule

vuule commented Oct 27, 2023

Copy link
Copy Markdown
Contributor Author

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

None yet

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