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

RMM error is unclear when LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE is not provided #1783

Open
bdice opened this issue Jan 9, 2025 · 1 comment
Labels
feature request New feature or request

Comments

@bdice
Copy link
Contributor

bdice commented Jan 9, 2025

Currently, RMM uses experimental features from libcudacxx. We define this in CMake (

target_compile_definitions(rmm INTERFACE LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE)
) but not all users of RMM are consuming it via CMake (some people use Makefiles, etc.).

The error that users see looks like this:

/home/myuser/include/rmm/mr/device/device_memory_resource.hpp:312:65: error: 'cuda::mr' has not been declared
  312 |   friend void get_property(device_memory_resource const&, cuda::mr::device_accessible) noexcept {}

RMM should detect this case at compile time and explicitly issue a message about requiring LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE to be defined.

Maybe something like:

#ifndef LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE
#error "LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE must be defined to use RMM memory resources."
#endif

would suffice.

Alternatively we could explore enabling this definition in the RMM C++ code (if it's not defined).

@bdice
Copy link
Contributor Author

bdice commented Jan 9, 2025

This issue came from a Slack conversation with @ZiqiFrancisFan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
Status: To-do
Development

No branches or pull requests

1 participant