f40ce73e89
Added detection of IBM/Power NVLink bridge device.
Add NUMA support to PCI distance calculations.
Added NCCL_IGNORE_CPU_AFFINITY env var.
Fix memory leaks; GithubIssue#180
Compiler warning fix; GithubIssue#178
Replace non-standard variable length arrays. GithubIssue#171
Fix Tree+Shared Memory crash. GithubPR#185
Fix LL cleanup hang during long running DL jobs.
Fix NCCL_RINGS environment variable handling.
Added extra checks to catch repeat calls to ncclCommDestroy() GithubIssue#191
Improve bootstrap socket connection reliability at scale.
Fix hostname hashing issue. GithubIssue#187
Code cleanup to rename all non device files from *.cu to *.cc
66 wiersze
1.6 KiB
C
66 wiersze
1.6 KiB
C
/*************************************************************************
|
|
* Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* See LICENSE.txt for license information
|
|
************************************************************************/
|
|
|
|
#ifndef NCCL_CORE_H_
|
|
#define NCCL_CORE_H_
|
|
|
|
#include <pthread.h>
|
|
#include <algorithm>
|
|
#include "nccl.h"
|
|
#include "debug.h"
|
|
#include "checks.h"
|
|
#include "alloc.h"
|
|
#include "transport.h"
|
|
#include "devcomm.h"
|
|
#include "comm.h"
|
|
#include "info.h"
|
|
#include "argcheck.h"
|
|
#include <cstdio>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifdef PROFAPI
|
|
#define NCCL_API(ret, func, args...) \
|
|
__attribute__ ((visibility("default"))) \
|
|
__attribute__ ((alias(#func))) \
|
|
ret p##func (args); \
|
|
extern "C" \
|
|
__attribute__ ((visibility("default"))) \
|
|
__attribute__ ((weak)) \
|
|
ret func(args)
|
|
#else
|
|
#define NCCL_API(ret, func, args...) \
|
|
extern "C" \
|
|
__attribute__ ((visibility("default"))) \
|
|
ret func(args)
|
|
#endif // end PROFAPI
|
|
|
|
int ncclCudaCompCap();
|
|
ncclResult_t ncclNvlinkGpu(int* nvlink);
|
|
int64_t ncclTreeThreshold();
|
|
|
|
static __inline__ int ncclTypeSize(ncclDataType_t type) {
|
|
switch (type) {
|
|
case ncclInt8:
|
|
case ncclUint8:
|
|
return 1;
|
|
case ncclFloat16:
|
|
return 2;
|
|
case ncclInt32:
|
|
case ncclUint32:
|
|
case ncclFloat32:
|
|
return 4;
|
|
case ncclInt64:
|
|
case ncclUint64:
|
|
case ncclFloat64:
|
|
return 8;
|
|
default:
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
#endif // end include guard
|