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

Added ast tree to simplify expression lifetime management #17156

Merged
merged 29 commits into from
Nov 7, 2024

Conversation

lamarrr
Copy link
Contributor

@lamarrr lamarrr commented Oct 23, 2024

Description

This merge request follows up on #10744.
It attempts to simplify managing expressions by adding a class called an ast tree. The ast tree manages and holds related expressions together. When the tree is destroyed, all the expressions are also destroyed. Ideally we would use a bump allocator for allocating the expressions instead of std::vector<std::unique_ptr<expression>>.

We'd also ideally use a cuda::std::inplace_vector for storing the operands of the operation class, but that's in a newer version of CCCL.

Checklist

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

@lamarrr lamarrr requested a review from a team as a code owner October 23, 2024 19:25
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Oct 23, 2024
@lamarrr lamarrr added feature request New feature or request non-breaking Non-breaking change labels Oct 23, 2024
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/src/ast/expressions.cpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the CMake CMake build issue label Oct 29, 2024
@lamarrr lamarrr requested a review from bdice November 1, 2024 15:02
@lamarrr lamarrr requested a review from wence- November 1, 2024 15:02
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Trivial comment suggestions (my approval has no power here)

cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/ast/expressions.hpp Outdated Show resolved Hide resolved
cpp/tests/ast/ast_tree_tests.cpp Outdated Show resolved Hide resolved
lamarrr and others added 2 commits November 4, 2024 18:09
Co-authored-by: Lawrence Mitchell <wence@gmx.li>
Co-authored-by: Lawrence Mitchell <wence@gmx.li>
lamarrr and others added 6 commits November 4, 2024 18:10
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.

Nice work!

Copy link
Contributor

@karthikeyann karthikeyann left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@vyasr
Copy link
Contributor

vyasr commented Nov 7, 2024

/merge

1 similar comment
@lamarrr
Copy link
Contributor Author

lamarrr commented Nov 7, 2024

/merge

@rapids-bot rapids-bot bot merged commit 4cbc15a into rapidsai:branch-24.12 Nov 7, 2024
102 checks passed
@lamarrr lamarrr deleted the ast-expr-enhancement branch November 7, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CMake build issue feature request New feature or request 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