f9c3dc251e
Add local user buffer registration for NVLink SHARP. Add tuning plugin support. Increase net API to v7 to allow for device-side packet reordering; remove support for v4 plugins. Add support for RoCE ECE. Add support for C2C links. Better detect SHM allocation failures to avoid crash with Bus Error. Fix missing thread unlocks in bootstrap (Fixes #936). Disable network flush by default on H100. Move device code from src/collectives/device to src/device.
49 lines
1.6 KiB
C++
49 lines
1.6 KiB
C++
/*************************************************************************
|
|
* Copyright (c) 2015-2022, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* See LICENSE.txt for license information
|
|
************************************************************************/
|
|
|
|
#ifndef NCCL_INT_DEBUG_H_
|
|
#define NCCL_INT_DEBUG_H_
|
|
|
|
#include "nccl.h"
|
|
#include "nccl_common.h"
|
|
#include <stdio.h>
|
|
#include <chrono>
|
|
#include <type_traits>
|
|
|
|
#include <limits.h>
|
|
#include <string.h>
|
|
#include <pthread.h>
|
|
|
|
// Conform to pthread and NVTX standard
|
|
#define NCCL_THREAD_NAMELEN 16
|
|
|
|
extern int ncclDebugLevel;
|
|
extern uint64_t ncclDebugMask;
|
|
extern pthread_mutex_t ncclDebugLock;
|
|
extern FILE *ncclDebugFile;
|
|
extern ncclResult_t getHostName(char* hostname, int maxlen, const char delim);
|
|
|
|
void ncclDebugLog(ncclDebugLogLevel level, unsigned long flags, const char *filefunc, int line, const char *fmt, ...) __attribute__ ((format (printf, 5, 6)));
|
|
|
|
// Let code temporarily downgrade WARN into INFO
|
|
extern thread_local int ncclDebugNoWarn;
|
|
extern char ncclLastError[];
|
|
|
|
#define WARN(...) ncclDebugLog(NCCL_LOG_WARN, NCCL_ALL, __FILE__, __LINE__, __VA_ARGS__)
|
|
#define INFO(FLAGS, ...) ncclDebugLog(NCCL_LOG_INFO, (FLAGS), __func__, __LINE__, __VA_ARGS__)
|
|
#define TRACE_CALL(...) ncclDebugLog(NCCL_LOG_TRACE, NCCL_CALL, __func__, __LINE__, __VA_ARGS__)
|
|
|
|
#ifdef ENABLE_TRACE
|
|
#define TRACE(FLAGS, ...) ncclDebugLog(NCCL_LOG_TRACE, (FLAGS), __func__, __LINE__, __VA_ARGS__)
|
|
extern std::chrono::steady_clock::time_point ncclEpoch;
|
|
#else
|
|
#define TRACE(...)
|
|
#endif
|
|
|
|
void ncclSetThreadName(pthread_t thread, const char *fmt, ...);
|
|
|
|
#endif
|