1e55645d97
1. Fix RCCL unit test 2. Add ROME detection and tuning 3. Change default P2P level 4. Fix search algorithm for XGMI 5. Remove explicit channel duplication with implicit by using half of link speed 6. Add collective trace support 7. Correct Intel Skylake CPU detection and bandwidth 8. Fix topo connect function 9. Disable GDR read and remove unreachable code 10. Disable LL128 kernels 11. Add tuning parameters 12. Use original clock64() implementation which returns RTC counter value 13. Print out timestamp of collective trace 14. Do not use struct ncclColl in kernel launch parameter 15. Fix abort handling and add tracing 17. Add __launch_bounds__ to kernel functions 18. Remove unused abortCount 19. Unset default MIN_NRINGS and MIN_NCHANNELS 20. Do not allocate shared memory when not using LL128 kernels 21. Correct time print out in tuning log
83 строки
2.6 KiB
C
83 строки
2.6 KiB
C
#include "hip/hip_runtime.h"
|
|
/*************************************************************************
|
|
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
|
* Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
|
|
*
|
|
* See LICENSE.txt for license information
|
|
************************************************************************/
|
|
|
|
#ifndef NCCL_COLLECTIVES_H_
|
|
#define NCCL_COLLECTIVES_H_
|
|
|
|
#include "core.h"
|
|
#include "info.h"
|
|
|
|
#define FUNC_INDEX(coll, redop, dtype, al, pr) ((((((coll)*ncclNumOps + (redop))*ncclNumTypes) + (dtype))*NCCL_NUM_ALGORITHMS+(al))*NCCL_NUM_PROTOCOLS+(pr))
|
|
|
|
#define NCCL_COLL_NAME(coll, op, dtype) \
|
|
coll##_##op##_##dtype
|
|
|
|
#define NCCL_KERN_NAME(coll, op, dtype) \
|
|
coll##Kernel_##op##_##dtype
|
|
|
|
/* Declare all collective operations */
|
|
#define DECL_COLL5(coll, op, dtype) \
|
|
extern __device__ __attribute__((noinline)) void NCCL_COLL_NAME(coll, op, dtype)(struct CollectiveArgs* args); \
|
|
extern __global__ void NCCL_KERN_NAME(coll, op, dtype)(struct ncclDevComm* comm); \
|
|
|
|
#define DECL_COLL4(coll, op, dtype) \
|
|
DECL_COLL5(coll, op, dtype) \
|
|
DECL_COLL5(coll##LL, op, dtype) \
|
|
DECL_COLL5(coll##LL128, op, dtype)
|
|
|
|
#define DECL_COLL3(coll, op, dtype) \
|
|
DECL_COLL4(coll##Ring, op, dtype) \
|
|
DECL_COLL4(coll##Tree, op, dtype)
|
|
|
|
#define DECL_COLL2(coll, op) \
|
|
DECL_COLL3(coll, op, i8) \
|
|
DECL_COLL3(coll, op, u8) \
|
|
DECL_COLL3(coll, op, i32) \
|
|
DECL_COLL3(coll, op, u32) \
|
|
DECL_COLL3(coll, op, i64) \
|
|
DECL_COLL3(coll, op, u64) \
|
|
DECL_COLL3(coll, op, f16) \
|
|
DECL_COLL3(coll, op, f32) \
|
|
DECL_COLL3(coll, op, f64) \
|
|
DECL_COLL3(coll, op, b16)
|
|
|
|
#define DECL_COLL(coll) \
|
|
DECL_COLL2(coll, sum) \
|
|
DECL_COLL2(coll, prod) \
|
|
DECL_COLL2(coll, min) \
|
|
DECL_COLL2(coll, max)
|
|
|
|
#define DECL_ALL_COLLS \
|
|
DECL_COLL2(ncclBroadcast, copy) \
|
|
DECL_COLL(ncclReduce) \
|
|
DECL_COLL2(ncclAllGather, copy) \
|
|
DECL_COLL(ncclReduceScatter) \
|
|
DECL_COLL(ncclAllReduce) \
|
|
|
|
DECL_ALL_COLLS
|
|
|
|
// CHUNKSIZE must be a multiple of SLICESIZE
|
|
//#define ALLREDUCE_SLICESTEPS (NCCL_STEPS/4)
|
|
//#define ALLREDUCE_CHUNKSTEPS (NCCL_STEPS/2)
|
|
//#define ALLGATHER_SLICESTEPS (NCCL_STEPS/4)
|
|
//#define ALLGATHER_CHUNKSTEPS (NCCL_STEPS/2)
|
|
//#define REDUCESCATTER_SLICESTEPS (NCCL_STEPS/4)
|
|
//#define REDUCESCATTER_CHUNKSTEPS (NCCL_STEPS/2)
|
|
#define ALLREDUCE_SLICESTEPS 4
|
|
#define ALLREDUCE_CHUNKSTEPS 4
|
|
#define ALLGATHER_SLICESTEPS 4
|
|
#define ALLGATHER_CHUNKSTEPS 4
|
|
#define REDUCESCATTER_SLICESTEPS 4
|
|
#define REDUCESCATTER_CHUNKSTEPS 4
|
|
#define BROADCAST_SLICESTEPS 1
|
|
#define BROADCAST_CHUNKSTEPS 1
|
|
#define REDUCE_SLICESTEPS 1
|
|
#define REDUCE_CHUNKSTEPS 1
|
|
|
|
#endif
|