Skip to content

Commit

Permalink
fix(rdma): avoid lttng templates under extern "C"
Browse files Browse the repository at this point in the history
On builds where lttng is enabled, the inclusion of nccl_ofi_tracepoint.h
pulls in <lttng/ust-utils.h>, which defines templates when __cplusplus
is defined without restraint. Those templates cannot have C linkage.

This file does not really need nccl_ofi_tracepoint.h; it only needs
config.h to test for whether NVTX tracing is enabled, and then it needs
nvtx3 headers in the case that it is so that it may define storage for
the nvtx domain handles.

Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
  • Loading branch information
Nicholas Sielicki committed Nov 7, 2024
1 parent ed096b0 commit 50b652b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/nccl_ofi_rdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern "C" {
#endif

#include "config.h"

#include <rdma/fabric.h>

#include "nccl_ofi.h"
Expand All @@ -19,8 +21,10 @@ extern "C" {
#include "nccl_ofi_deque.h"
#include "nccl_ofi_freelist.h"
#include "nccl_ofi_idpool.h"
#include "nccl_ofi_tracepoint.h"
#include "nccl_ofi_ep_addr_list.h"
#if HAVE_NVTX_TRACING
#include <nvtx3/nvToolsExt.h>
#endif

/* Maximum number of rails supported. This defines the size of
* messages exchanged during connection establishment (linear
Expand Down

0 comments on commit 50b652b

Please sign in to comment.