Skip to content

Commit

Permalink
tuner: Fix missing config.h include
Browse files Browse the repository at this point in the history
Without this, we were incorrectly including neuron headers instead of
CUDA ones when HAVE_CUDA was not defined. Also fail compilation if
neither definition was found rather than having a fall-through case.

Signed-off-by: Raghu Raja <[email protected]>
  • Loading branch information
rajachan committed Mar 28, 2024
1 parent 2adb8f5 commit 8476fb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/nccl-headers/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

#if HAVE_CUDA
#include "nccl-headers/nvidia/err.h"
#else
#elif HAVE_NEURON
#include "nccl-headers/neuron/error.h"
#else
#error "Neither CUDA nor Neuron support is available"
#endif

#endif
2 changes: 2 additions & 0 deletions include/nccl_ofi_tuner.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef NCCL_OFI_TUNER_H_
#define NCCL_OFI_TUNER_H_

#include "config.h"

#include <linux/limits.h>
#include <float.h>
#include "nccl-headers/nvidia/tuner.h"
Expand Down

0 comments on commit 8476fb9

Please sign in to comment.