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

Add a missing RMM_EXEC_CHECK_DISABLE in device_uvector constructors #1786

Open
wants to merge 1 commit into
base: branch-25.02
Choose a base branch
from

Conversation

caugonnet
Copy link

@caugonnet caugonnet commented Jan 17, 2025

Description

One of the constructor was missing a RMM_EXEC_CHECK_DISABLE annotation, resulting in (false positive ?) warnings:

error: calling a __host__ function("rmm::device_buffer::operator =(rmm::device_buffer&&)") from a __host__ __device__ function("rmm::device_uvector<unsigned long> ::operator =") is not allowed

Checklist

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

…n, resulting in (false positive ?) warnings:

error: calling a __host__ function("rmm::device_buffer::operator =(rmm::device_buffer&&)") from a __host__ __device__ function("rmm::device_uvector<unsigned long> ::operator =") is not allowed
@caugonnet caugonnet requested a review from a team as a code owner January 17, 2025 13:27
@caugonnet caugonnet requested review from wence- and miscco January 17, 2025 13:27
Copy link

copy-pr-bot bot commented Jan 17, 2025

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 Jan 17, 2025
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.

Do we need the same change in device_scalar? The pattern looks identical.

Can you provide a reproducer of the error, perhaps as a test that can be compiled?

@harrism
Copy link
Member

harrism commented Jan 17, 2025

Yeah what is the false positive? Is relaxed-contstexpr-defined?

@caugonnet
Copy link
Author

I could not make a repro yet, and the actual offending code is cuGraph, so nothing close to a simple example to reproduce (it does use relaxed constexpr indeed).

Doing some archeology, the reason for disabling these warning in the other constructor was the following (even if i could not make a repro with thrust::optional<...> yet.

commit dc3ca447615518f0cdfcc45127eb63868d07ce63
Author: Robert Maynard <[email protected]>
Date:   Thu Mar 18 09:09:15 2021 -0700

    device_uvector can be used within thrust::optional (#734)
    
    Fixes https://github.com/rapidsai/cudf/issues/7629
    
    Since thrust::optional is marked with host and device markup,
    we need to make sure we don't generate errors when device_uvector
    is placed inside of it as it will inherit the device markup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp Pertains to C++ code
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

3 participants