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

Switch pylibcudf-enabled types to use enum class in Cython #13931

Merged
merged 13 commits into from
Aug 25, 2023

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Aug 22, 2023

Description

This PR leverages Cython 3's support for C++'s scoped enumerations to more faithfully translate libcudf types into cuDF Cython and pylibcudf. Due to some Cython 3 limitations, there are a few workarounds in this PR. However, they are relatively minor and can be adjusted later as Cython improves. In the meantime, the change here is an improvement still worth merging, especially since it sets a template for how pylibcudf code should look as more of it emerges. Existing cuDF Cython is only updated to the minimum extent required for it to compile. Fully switching the old code to use enum class-style syntax isn't worthwhile since those internals should eventually be migrated to use pylibcudf in pure Python mode anyway.

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 Python Affects Python cuDF API. CMake CMake build issue labels Aug 22, 2023
@vyasr vyasr self-assigned this Aug 22, 2023
@vyasr vyasr added feature request New feature or request 3 - Ready for Review Ready for review by team Cython non-breaking Non-breaking change labels Aug 22, 2023
@vyasr vyasr marked this pull request as ready for review August 22, 2023 15:26
@vyasr vyasr requested a review from a team as a code owner August 22, 2023 15:26
@vyasr vyasr requested review from galipremsagar and isVoid August 22, 2023 15:26
Copy link
Contributor

@shwina shwina left a comment

Choose a reason for hiding this comment

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

LGTM. Hopefully we have fixes in Cython in soon that will ease some of the pain here.

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Looks fine to me. I hope we are able to shed the tech debt (issue workarounds) sooner than later...

docs/cudf/source/developer_guide/pylibcudf.md Outdated Show resolved Hide resolved
@vyasr
Copy link
Contributor Author

vyasr commented Aug 25, 2023

/merge

@rapids-bot rapids-bot bot merged commit b6d08ca into rapidsai:branch-23.10 Aug 25, 2023
@vyasr vyasr deleted the feat/cython_enum_class branch August 25, 2023 22:13
@vyasr vyasr added the pylibcudf Issues specific to the pylibcudf package label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team CMake CMake build issue feature request New feature or request non-breaking Non-breaking change pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants