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 the friend declaration with an attribute #1669

Conversation

kingcrimsontianyu
Copy link
Contributor

@kingcrimsontianyu kingcrimsontianyu commented Sep 5, 2024

Description

The logging_resource_adaptor has a friend declaration (which is not a definition) preceded by an attribute, whereas C++ standard requires that such declaration must be a definition. gcc 11.4.0 used in the dev container does not correctly identify this, but gcc 12.1 and newer are able to, and will report a compile error (converted from a warning) when building RMM:

an attribute that appertains to a friend declaration that is not a definition is ignored

This simple PR removes the friend declaration from the logging_resource_adaptor class. This is valid since in recent releases of RMM the friended function no longer accesses any private (or protected) data or methods of logging_resource_adaptor.

closes #1668

Checklist

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

@kingcrimsontianyu kingcrimsontianyu requested a review from a team as a code owner September 5, 2024 15:26
Copy link

copy-pr-bot bot commented Sep 5, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the cpp Pertains to C++ code label Sep 5, 2024
@wence-
Copy link
Contributor

wence- commented Sep 5, 2024

/ok to test

@kingcrimsontianyu kingcrimsontianyu requested a review from a team as a code owner September 5, 2024 18:17
@github-actions github-actions bot added the CMake label Sep 5, 2024
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Thanks for the fix and for noticing that we no longer need this friend declaration!

Just wondering about the cmake test GPU configuration changes.

tests/CMakeLists.txt Outdated Show resolved Hide resolved
@bdice bdice added bug Something isn't working non-breaking Non-breaking change labels Sep 5, 2024
@harrism
Copy link
Member

harrism commented Sep 6, 2024

/ok to test

@harrism
Copy link
Member

harrism commented Sep 6, 2024

I don't think adding a single signed commit is enough. There have to be zero unsigned commits in the history of the PR.

@harrism
Copy link
Member

harrism commented Sep 6, 2024

/merge

Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Blocking merge while we discuss the GPUS 1 PERCENT 100 further.

tests/CMakeLists.txt Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the CMake label Sep 6, 2024
@kingcrimsontianyu kingcrimsontianyu force-pushed the tianyu.liu/remove-friend-decl-with-attr branch from 787edd2 to df198e9 Compare September 6, 2024 16:19
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.

Thanks for reverting the CMake changes for now — we can explore improving the tests in a follow-up.

@vuule vuule requested a review from harrism September 6, 2024 19:06
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Thanks!

@rapids-bot rapids-bot bot merged commit 8bc51c3 into rapidsai:branch-24.10 Sep 6, 2024
57 checks passed
@kingcrimsontianyu kingcrimsontianyu self-assigned this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cpp Pertains to C++ code non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Compile error using gcc 13.2.0
5 participants