rapidsai / raft

RAFT contains fundamental widely-used algorithms and primitives for machine learning and information retrieval. The algorithms are CUDA-accelerated and form building blocks for more easily writing high performance applications.
https://docs.rapids.ai/api/raft/stable/
Apache License 2.0
680 stars 180 forks source link

[BUG] Enable logging macros in downstream projects #2357

Open tfeher opened 3 weeks ago

tfeher commented 3 weeks ago

Describe the bug The raft logging macros rely on RAFT_NAME static variable to get the logger.

RAFT_NAME is defined in the raft namespace, but the macros use the variable without specifying the namespace.

This leads to an error if the logger is used in a dowstream project, like cuvs. Currently the following workaround is used:

https://github.com/rapidsai/cuvs/blob/863b8bdd4ef25537d453157eae2dd2bcf8e69786/cpp/src/cluster/detail/kmeans.cuh#L60

Expected behavior Logging works without adding extra definition for RAFT_NAME.