2018-09-24 16:06:59 -07:00
|
|
|
/*************************************************************************
|
2019-03-14 19:39:20 -07:00
|
|
|
* Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved.
|
2019-07-05 15:43:00 -07:00
|
|
|
* Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
|
2018-09-24 16:06:59 -07:00
|
|
|
*
|
|
|
|
|
* See LICENSE.txt for license information
|
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef NCCL_ENQUEUE_H_
|
|
|
|
|
#define NCCL_ENQUEUE_H_
|
|
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
#include "group.h"
|
|
|
|
|
|
2019-03-14 19:39:20 -07:00
|
|
|
// Channels / LL tuning
|
|
|
|
|
#define NCCL_LL_CHANNEL_THRESHOLD 8 // Per thread size before we start increasing nrings
|
2019-07-05 15:43:00 -07:00
|
|
|
#define NCCL_THREAD_THRESHOLD 256 // Per thread size before we switch to non-LL
|
2019-03-14 19:39:20 -07:00
|
|
|
#define NCCL_THREAD_THRESHOLD_PREVOLTA 32 // Per thread size before we switch to non-LL for pre-Volta archs
|
2019-08-15 09:16:11 -07:00
|
|
|
#define NCCL_THREAD_THRESHOLD_VEGA 8 // Per thread size before we switch to non-LL for VEGA
|
2019-07-05 15:43:00 -07:00
|
|
|
#define NCCL_LL_MIN_NTHREADS 256
|
2019-03-14 19:39:20 -07:00
|
|
|
|
2018-12-13 15:56:12 -08:00
|
|
|
ncclResult_t ncclEnqueueCheck(struct ncclInfo* info);
|
2018-09-24 16:06:59 -07:00
|
|
|
ncclResult_t ncclCpuBarrierIn(ncclComm_t comm, int* isLast);
|
|
|
|
|
ncclResult_t ncclCpuBarrierLast(ncclComm_t comm);
|
|
|
|
|
ncclResult_t ncclCpuBarrierOut(ncclComm_t comm);
|
|
|
|
|
ncclResult_t ncclBarrierEnqueue(ncclComm_t comm);
|
|
|
|
|
ncclResult_t ncclBarrierEnqueueWait(ncclComm_t comm);
|
|
|
|
|
ncclResult_t ncclEnqueueEvents(ncclComm_t comm);
|
|
|
|
|
|
|
|
|
|
#endif // End include guard
|