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

Use dev_string_lengths. #13991

Closed
wants to merge 1 commit into from

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Aug 29, 2023

Description

It seems like a device lambda is accessing a host std::vector when it should be accessing a device uvector 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.

@github-actions github-actions bot added the Java Affects Java cuDF API. label Aug 29, 2023
@@ -2220,7 +2220,7 @@ std::unique_ptr<table> convert_from_rows(lists_column_view const &input,
std::vector<rmm::device_uvector<char>> string_data_cols;
std::vector<size_type *> string_col_offset_ptrs;
std::vector<char *> string_data_col_ptrs;
for (auto &col_string_lengths : string_lengths) {
for (auto &col_string_lengths : dev_string_lengths) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hyperbolic2346 On second thought, I'm not sure about this change. I think the string_lengths vector is a host vector of device pointers, so it seems like binding auto &col_string_lengths : string_lengths by value into the lambda tmp is actually just binding a device pointer by value into the lambda -- there's no issue with using that on device. It's awkward, yes, but this is probably correct with no changes. If you agree let's close this PR.

@bdice
Copy link
Contributor Author

bdice commented Aug 29, 2023

Discussed offline with @hyperbolic2346. This code is fine as-is. I'll close this PR.

@bdice bdice closed this Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Affects Java cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant