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

Fix build failures with GCC 13 #16488

Merged
merged 9 commits into from
Aug 5, 2024

Conversation

PointKernel
Copy link
Member

@PointKernel PointKernel commented Aug 2, 2024

Description

Closes #16395

This PR resolves two types of compilation errors, allowing for successful builds with GCC 13:

  • replacing the cuco_allocator strong type with an alias to fix a new build time check with GCC 13
  • removing std::move when returning a temporary

Checklist

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

@PointKernel PointKernel added bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Aug 2, 2024
@PointKernel PointKernel self-assigned this Aug 2, 2024
Comment on lines -40 to -52
class cuco_allocator
: public rmm::mr::stream_allocator_adaptor<rmm::mr::polymorphic_allocator<char>> {
/// Default stream-ordered allocator type
using default_allocator = rmm::mr::polymorphic_allocator<char>;
/// The base allocator adaptor type
using base_type = rmm::mr::stream_allocator_adaptor<default_allocator>;

public:
/**
* @brief Constructs the allocator adaptor with the given `stream`
*/
cuco_allocator(rmm::cuda_stream_view stream) : base_type{default_allocator{}, stream} {}
};
Copy link
Member Author

@PointKernel PointKernel Aug 2, 2024

Choose a reason for hiding this comment

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

The existing cuco_allocator convenience wrapper cannot pass a build time check with GCC 13 where it requires rmm::mr::stream_allocator_adaptor<rmm::mr::polymorphic_allocator<char>> and cuco_allocator to be the same type.

@PointKernel PointKernel marked this pull request as ready for review August 2, 2024 22:35
@PointKernel PointKernel requested a review from a team as a code owner August 2, 2024 22:35
@PointKernel PointKernel added the 3 - Ready for Review Ready for review by team label Aug 2, 2024
Copy link
Contributor

@davidwendt davidwendt left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks for fixing this.

@PointKernel PointKernel changed the title Fix build failures with gcc-13 Fix build failures with GCC 13 Aug 5, 2024
@PointKernel
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 8068a2d into rapidsai:branch-24.10 Aug 5, 2024
82 checks passed
@PointKernel PointKernel deleted the fix-gcc13-build branch August 5, 2024 21:48
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 bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG]: cudf fails to compile with g++-13.1 and nvcc 12.5.4
3 participants