Skip to content

Commit

Permalink
Always include config.h first
Browse files Browse the repository at this point in the history
To make autoconf config.h useful, it needs to be the first include
in any .c file.  Fix a couple of occurances that were missed.  With
those fixups, there's no need for the bandaid includes in some of
the header files, so remove those as well.

Signed-off-by: Brian Barrett <[email protected]>
  • Loading branch information
bwbarrett committed Mar 30, 2024
1 parent a04d366 commit d91e9bf
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
2 changes: 0 additions & 2 deletions include/nccl_ofi_rdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
extern "C" {
#endif

#include "config.h"

#include <rdma/fabric.h>

#include "nccl_ofi.h"
Expand Down
2 changes: 0 additions & 2 deletions include/nccl_ofi_sendrecv.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
extern "C" {
#endif

#include "config.h"

#include <rdma/fabric.h>
#include "nccl_ofi.h"
#include "nccl_ofi_freelist.h"
Expand Down
1 change: 0 additions & 1 deletion include/tracepoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
*
*/

#include "config.h"
#if HAVE_LIBLTTNG_UST == 1

/*
Expand Down
2 changes: 2 additions & 0 deletions src/nccl_ofi_idpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
*/

#include "config.h"

#include "nccl_ofi.h"
#include "nccl_ofi_idpool.h"
#include "nccl_ofi_math.h"
Expand Down
3 changes: 3 additions & 0 deletions src/tuner/nccl_ofi_model.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "config.h"

#include <stdlib.h>
#include <math.h>

#include "nccl-headers/nvidia/tuner.h"
#include "nccl_ofi_tuner.h"
#include "nccl_ofi_log.h"
Expand Down
3 changes: 3 additions & 0 deletions src/tuner/nccl_ofi_tuner.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "config.h"

#include <stdlib.h>
#include <pthread.h>

#include "nccl-headers/nvidia/tuner.h"
#include "nccl_ofi_tuner.h"
#include "nccl_ofi_log.h"
Expand Down

0 comments on commit d91e9bf

Please sign in to comment.