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

Remove scalar_to_column_view #11241

Draft
wants to merge 3 commits into
base: branch-22.08
Choose a base branch
from

Conversation

rwlee
Copy link
Contributor

@rwlee rwlee commented Jul 12, 2022

Followup to #11153 stemming from a discussion with @bdice. Opening as a workspace/discussion location to debug the issue further.

Replacing scalar_to_column_view with make_column_from_scalar causes a cuda memory error at cpp/src/binaryop/compiled/binary_ops.cuh line 127. Both approaches should be functionally the same, the only difference being who owns the underlying single row column data.

There is an additional testing issue where the results are checked regardless of validity of the scalar value. This implies that the resulting value is generated regardless of the nullability of the value -- verifying the results of undefined behavior that changes when make_column_from_scalar is used.

@github-actions github-actions bot added CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code. labels Jul 12, 2022
@rwlee rwlee added bug Something isn't working 2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function and removed CMake CMake build issue labels Jul 12, 2022
@rwlee rwlee requested a review from bdice July 12, 2022 06:56
@rwlee rwlee added the non-breaking Non-breaking change label Jul 12, 2022
@karthikeyann
Copy link
Contributor

Replacing scalar_to_column_view with make_column_from_scalar

What is the reason for this proposal?

@mythrocks
Copy link
Contributor

mythrocks commented Jul 12, 2022

Replacing scalar_to_column_view with make_column_from_scalar

What is the reason for this proposal?

I too wonder why. I think it is to make explicit that the ownership the column-view (resulting from the scalar) lies with the caller.
While those semantics hold even now (via pair<column_view, unique_ptr<column>), it might be more intentional to first create the column, then create a view.

@rwlee: It might be best to change the description of this PR to address what the change is, and the motivation. This is what one will see from the git log.
The additional information (regarding the cuda memory error and the test failure) can be moved to a comment on Github. These will be resolved by the time this PR is merged.
Edit: Apologies if those changes were already in the works.

@mythrocks mythrocks removed the bug Something isn't working label Jul 12, 2022
@github-actions
Copy link

This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.

@vyasr
Copy link
Contributor

vyasr commented Jan 19, 2024

@rwlee @bdice do either of you recall whether this PR was something we wanted to move forward with?

@bdice
Copy link
Contributor

bdice commented Jan 19, 2024

@vyasr I think we do want to do something here and not close, but perhaps starting over with a fresh PR is warranted. There is some scalar/column logic being implemented in binary_ops.cu that should be using utilities or factories from elsewhere in cudf. This includes scalar_as_column_view and scalar_to_column_view.

@vyasr
Copy link
Contributor

vyasr commented Jan 19, 2024

All right, I'll leave this one open for now so that we don't forget to come back to this. At some point it might be worth writing an issue with a proposal if we plan to close this issue, but for now this seems fine as documentation for the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants